Jump to content
  • Advertisement
Sign in to follow this  
Norman Barrows

control avatar height off ground in animation or with code?

This topic is 1243 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is it better to control an avatar's height off the ground in an animation or with code?


i currently do it with code, changing the y render height based on the animation playing. 


i'm using rigid body models. an avatar's torso mesh is the root parent of all other limbs in an avatar model. so i can just change the y location of the torso mesh with respect to the object space origin. this will change the y location of the avatar with respect to the location the code draws it at. and one set of code that draws at the "usual" height would work for all animations. and best of all, i wouldn't have to tweak the drawing height of animations in the code, then look at it in the game. i could set it one time in the modeler (and then get a beer! <g> job done! miller time! <g>).


sure seems like doing it in the animation is the way to go. is there any problem with doing it that way, or is that the preferred way?


if i wanted to do the same animation at different heights, code would be better than a bunch of basically duplicate animations. but i can't think of anything one would draw at two different heights. you're lying down, kneeling, sitting on the ground, sitting on a surface (chair etc), or standing, but seldom (never?) more than one while playing the same animation. note that i'm not talking about things like jumping or flying animations whose height is usually best handled with code. sitting on a steed might also be best handled with code, with height based on distance to steed's object center.



Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!