Created by Spacejim, from code from Gnometech, Skillator and Beorn
Email Contact@dustgunners.com
Free for all GameStudio projects, without restrictions


The thing about code donations, is that they always need to be adapted to fit your own code.  So here is a vertex attach code in the form of a neat and tidy function that you can call at will.  Usage instructions are commented into the code.

I have tried simpler vertex attach functions, but I got problems under certain conditions where they diddn't lock to the entity like they should, and would move freely when the player rotates.  I also had the problem that you could put a gun in the player's hand but the roll would be wrong and the gun would be on its side etc.  This is all solved here with the control of the roll angle.
