ThirdPerson Aiming ? (for aiming up and down)

I am wondering what way is best for having a charactor aim up and down. (This is in thirdperson/RPG type view Not FPS view)

1. Bruteish way
Have a special bone in the belt/waist area and rotate that thus moveing the arms and upper body/gun with it.

pro: simple to script
con: can look ugly at max and min extreams

2. Refined way
Have a animation that runs from max elevation to min and figure out some way to translate that into up and down by scripting.

pro: can costumize the animation
con: may require alot of scripting and/or animation work

3. ???
Rig up somthing special to make the hand bones follow the gun as its rotated

pro: doesnt make the charactor bend extreamly like #1
con: may get some warping or other unwanted stuff when the gun is rotated

Does anyone know which one is the best way? Or if there is a another way.

And I would love some pointers on how to do the 2nd.

Computer died on me after I wrote this a few weeks ago.

130 views and nothing.

Guess I will bump this and see if anyone has any info or exp on this.

I would hazard a guess the second option would be the way of choice. And I think the scripting might not be all that hard even.

Taking a look at the animation class, I’d say AnimationState.time might be just what you want. You could have a value proportional to your aiming height, and set the ‘time’ of the animation to the corresponding point. Thus giving your character the desired angle of aiming.
You’d still have to take care of your blending/layers as to not inhibit any other animations taking place, but I recon you’ll figure that out.

animation["Walk"].time = 0.0;

Time in this case is that the frame of the animation or realtime? If not is there a way to run it by frames.

Was thinking of having an animation with one frame per * from top to bottom in say a 45* arc and just run it to the frame I need just like rotateing would work.

Trying to think of a way to make it simple to use for AI and human controled characters.

I think time here represents where on the clip the ‘playhead’ is. In ‘realtime’, not framewise.
Still this would be very usefull.

You would for instance make your character aim fully down (-35*) on the first frame, and fully up (+45*) on the last frame, let’s say the 80th frame (corresponding to your 80* action radius). Frames in between could be anything, from a simple linear interpolation, to a frame-by-frame perfect ‘animation’.
Now say you run this at 20 fps, this would mean your animation takes 4 seconds to complete. Ie “time = 0.0;” would make him point down at -35*. “time = 3.0;” would then be +25*, and so forth.

You’d have to check for the animation playback speed though; I don’t know what playback rate is ‘default’.

I’ve been having pretty good results using the head look example. I’m dealing with mechs but they’re bipedal.

That should work thanks Sal.

Quick search turned up 30fps as default. But it looks like you can set it to any of the standard rates.

JDonavan that works great on mech or “hard” type joints but on organic charactors it looks odd when they move like a robot.