Move a non-kinematic object?

immesys
Posts: 7
Joined: Fri May 16, 2008 8:01 am

Move a non-kinematic object?

Post by immesys »

I have an object which is controlled by the physics and I don't normally interfere with it. (Its not kinematic). However I do need to be able to move it every now and then. I tried directly getting the worldTransform from the motionstate, adjusting it and writing it back, but my object just flickers and moves back to where it was on the next physics step.

Is there a specific way to trigger a single update?

Thanks!
immesys
Posts: 7
Joined: Fri May 16, 2008 8:01 am

Re: Move a non-kinematic object?

Post by immesys »

DOH! If you set the btRigidBody's world transform instead of the btMotionState's worldtransform, it works fine... my bad.. nothing to see here...
Wavesonics
Posts: 71
Joined: Thu May 22, 2008 8:03 pm

Re: Move a non-kinematic object?

Post by Wavesonics »

My question here is, is that safe to do.

I know when I was using ODE there was a lot of talk about that possibly destabilizing the simulation.

Also, if you have a non-dynamic, yet still collidable object, and you move it by setting it's transform, is that safe as well? Will it still collide with dynamic objects in a realistic manner?