User controllable arm?
by Brian Richardson · in Torque Game Engine · 08/07/2004 (9:15 am) · 3 replies
I'd like to have a player model with an arm that you can control with your mouse. What's the best way to go about doing that?
Here are the ideas that I've come up with:
1. Look at/use the Turret resource. I could mount a "turret" arm to the shoulder of a model and get two degress of movement pretty easily.
2. Some how modify the bone positions and hope that the animation would update with it.
3. Blend two different arm animations together?
Thanks for any ideas/pointers!
Here are the ideas that I've come up with:
1. Look at/use the Turret resource. I could mount a "turret" arm to the shoulder of a model and get two degress of movement pretty easily.
2. Some how modify the bone positions and hope that the animation would update with it.
3. Blend two different arm animations together?
Thanks for any ideas/pointers!
#2
Thanks for the suggestion! I was researching IK a bit last night. I'd like to play with that more. But I guess I'm confused on how the bones work.
After looking at the turret resource, it looks like I can set a nodes animation state to TSShapeInstance::MaskNodeHandsOff. Then I can move the node around in updateLookAnimation. Will the vertices that are influenced by the node also move with it?
Is there a resource or doc I can look at that explains how the bones work?
Thanks so much for your help!
08/07/2004 (9:42 am)
Pat,Thanks for the suggestion! I was researching IK a bit last night. I'd like to play with that more. But I guess I'm confused on how the bones work.
After looking at the turret resource, it looks like I can set a nodes animation state to TSShapeInstance::MaskNodeHandsOff. Then I can move the node around in updateLookAnimation. Will the vertices that are influenced by the node also move with it?
Is there a resource or doc I can look at that explains how the bones work?
Thanks so much for your help!
#3
I don't know of any resources off the top of my head, but I know Ben Garney has messed with this stuff more than I have. If he sees this post he will have some wisdom.
08/07/2004 (9:56 am)
Yes. updateLookAnimation was used to move the heads of the guys around when they looked up and down. Basically what happens with bone animation is that vertices are tied to one, or multiple bones. When you transform the bone, the vertices get transformed accordingly. In the case of multiple bones, the transforms are blended together using 'weights'. This means that, lets say, the joint area in a models knee would be influanced by the upper-leg bone and the lower-leg bone, each vertex will have a blend-weight which tells the blending equation how much to let the two transforms effect it. It may be 70% upper leg, and 30% lower leg, etc.I don't know of any resources off the top of my head, but I know Ben Garney has messed with this stuff more than I have. If he sees this post he will have some wisdom.
Torque 3D Owner Pat Wilson