Sign in to follow this  
Enosch

Linear motion problems

Recommended Posts

Hey guys, I've recently implemented a "scene graph" in my 3d engine. Mainly, it supports heirarchical relationships using a matrix stack. Right now, it is demoed VERY simply with the terrain as the root, a dwarf model as its child and the camera as the dwarf's child. This way, you move the camera relative to the dwarf model. This gives a 3rd person camera effect, which works nicely. The problem happens when you move the dwarf model. I use linear motion model with a position and velocity. There are forces that act on each particle, like gravity and drag, and particles may collide with each other and with the terrain. Currently, gravity and drag are applied to the dwarf and only consider it colliding with the terrain. When it moves, its image (onscreen) appears to "skip". It moves correctly, but the image seems to shake from time to time around its accurate position and orientation (quaternion rotation). Any ideas? I'll try to get a demo posted asap. Thanks, - Enosch

Share this post


Link to post
Share on other sites
I had a gimble problem like this before, that turned out to be the conversion from vector data to quaternion rotation. Only thing I can suggest is to check any boundary cases-0,90,180 as these areas were where I was seeing shaking.

Share this post


Link to post
Share on other sites
I finally figured out the problem. I was updating all particles in the physics sim every frame from within the physics engine, and also updating all scene graph nodes from within the scene graph. This updated the linear motion of the "particles" (objects) twice each frame. Easily fixed. Thanks for the help though.

- Enosch

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this