attaching a weapon or tool to an avatar

Blitz3D Forums/Blitz3D Beginners Area/attaching a weapon or tool to an avatar

chrisnorris007(Posted 2009) [#1]
in a game, whats the easier way to code an avatar (character) picking up a weapon and it attaching itself to his arm...foot etc..

like clothing, weapons, etc


Ross C(Posted 2009) [#2]
To physically attach the weapon, and assuming your using a boned character, and also assuming it's 3d, you can use EntityParent to parent the weapon to a bone on the character and it will follow that bones motion.


chrisnorris007(Posted 2009) [#3]
hmmm how do you access the bones in a mesh?

chris


Ross C(Posted 2009) [#4]
FindChild or GetChild. Depending on whether you know the names of the bones or not.


Terry B.(Posted 2009) [#5]
dunno if this is any help but:

http://blitzbasic.com/Community/posts.php?topic=65419#730702

Solved my problems.