Jump to content
  • Advertisement
Sign in to follow this  
krionic

A jumpy object

This topic is 5474 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

I have a x file model that I draw to screen and then I can move it around based on user input (roll, yaw, move forward etc.) And I notice that the further it travels it becomes "unstable" its likes its jumping or "jerking" Basically i have my camera follow it around at a set distance at the inverse of the objects look vector. (camera is always directly behind object) The further the object moves from where I initialized it in world coords the more eratic it behaves in terms of jumpiness or jerking. If I move back towards where it was "born" it becomes more stable. Also, If I just move it straight out from where I first draw it then it doesnt behave as such. In other words, if I only move it forward. No rolling, turning, yawing etc. but, once i chance its look vector it starts the jumping and jerking. Anyone have any idea of where I can start looking to fix this? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sounds like it is caused by the imprecision of floats. What kind of scale are we talking about? Like, when its jumping, what is the size of the object and the location (approximatley)?

Share this post


Link to post
Share on other sites
pretty small, its happening relatively quickly. I'm thinking it has something to with imprecision as well, but this is ridiculous. The object is about (3.0f, 4.0f, 5.0f) and i create it at world coord (0,0,40) I'd say that when it moves about 2000 units I can start to see the jumping slowing kicking in, and at about 10,000 its just flat out distortion.

Share this post


Link to post
Share on other sites
the trigonometric functions do output rough numbers when their input values aren't between +2pi and -2pi, so if it goes a fair way out and u use sin/cos/tan/sinf/cosf/tanf etc you can get bad performance and dodgy outputs.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!