Manipulating Bones
Blitz3D Forums/Blitz3D Programming/Manipulating Bones
| ||
I've created an animated model(.b3d) of a character for a 3rd Person shooter/action game. In the game, I have a targeting reticle that floats out in the game space, and I want the character's arm/weapon to track the reticle. I thought I could simply manipulate the "RShoulder" Joint using FindChild(model,"RShoulder"), and then applying the appropriate rotations. It didn't seem to work. The character is cycling through a "Mounted Rider" type animation, and I was hoping to override the right arm. Does anyone have any suggestions, or has anyone done this before? |
| ||
IIRC, I heard that you should manipulate the bone AFTER UpdateWorld(). Not sure though |
| ||
That did it GitTech.. I've just got to do a little tweeking, but for the most part, it's good! Thanks. |
| ||
also i'd use RotateEntity because that won't cause snapping back when animations change unlike TurnEntity which does and looks bad. |
| ||
I actually ended up using PointEntity, and it works really well. I think the animation tweening covers quite a bit of it. Anyway, it looks really good now. |
| ||
that is the best way for your needs but for things like head turning etc i'd use rotateentity. |
| ||
You an also use this method to merge 2 animations (if your carefull). If you have a mesh with bones, with the main part of the animation, then a second mesh,.. which is just the bones, with your second animation. Then you can map the bones you want, from the second mesh, onto your visible mesh. |