June 11, 2008

more aiming

I came up with a better way to do weapon aiming. In order to implement it I had to rewrite some parts of the editor to make it work more like Maya. All of the objects in the editor (Joints, IKHandles, and Quads) are now derived from the same base class, called a TransformNode, which has translation and rotation values. They are all contained in the same hierarchy, with a single root node. Here is an example of how this system can be used for aiming:



In this example, the aim animation rotates the node that the IK handles are grouped to. The shooting/recoil animation moves the IK handles.

It seems so obvious now that this is the correct way to do it; I'm not sure why I didn't think to do it this way earlier. This system uses the IK handles directly, so the hands are always placed correctly. It's also more flexible and consistent than what I had in my previous post.

9 comments:

Anonymous

Impressive. Won't this look a little wierd though while looking straight down/up ?

Anna

Not sure what you mean, teh_ham. Weird how?

JacKDuRdEn_

this looks great!

Unknown

Wow! Nice! I wish I was this far with my tech... :)

Anonymous

Well, try it in real life. your arms don't just go straight up, do they? Your spine curves back and your head looks up (and vice versa when you look down). I'm just saying it would look a little unnatural - and since you're putting so much effort into making the characters act natural I thought it would make sense :p

You could limit the aiming angles though, that would be an easy way round it.

Anna

The spine and head do move a little in the example, though the spine could probably use another joint in it.

In the aim animation, any joint can be animated, just like a regular animation, but there are only two keyframes. When aiming, the angle of the vector between a specified joint and the crosshair is compared to the minimum and maximum angle of the aim animation to get an interpolation value. This value is used to do a linear interpolation between the two frames of the animation. So the animator has a lot of freedom in how the aiming looks. I should have probably explained that earlier - I'll try to clarify some more in a future post.

Anna

Also, thank you all for your comments!

Unknown

Hey anna first, you gave me no reason to write this but i hope you not become one of these talkers who do nothing but talk much i mean lock at MM he finished no game since Soldat.

Anna

Carsten, I'm pretty dedicated to this project, but I'm not making any promises. I really wouldn't want to be in the position that MM seems to be in now.

Post a Comment