Page 1 of 1

My problems with Kinematic Character control

Posted: Thu Nov 13, 2008 6:46 pm
by AndyK
Hi, I am having problems with Kinematic Character control. I set up my character as a rigid body and set the collision flags to be a kinematic object, I can get it to move and collide with other (dynamic) objects, but the problem is this.....
What should I be calling to actually move the object?
When I use btRigidBody->SetWorldTransform() it leaves a "ghost" object where the original player rigid body was created.
When I use btMotionState->SetWorldTransform() no "ghost" but there is a "jitter"...the character vibrates (usually on the z axis)
And when I use both at the same time the collision response for the dynamic objects seems to double.
Any help would be appreciated!!!

Re: My problems with Kinematic Character control

Posted: Thu Nov 13, 2008 9:43 pm
by reltham
I think you want to apply a force or set a velocity on the rigid body. The bullet internal code will then call the SetWorldTransform() functions when you step the simulation.

Re: My problems with Kinematic Character control

Posted: Thu Nov 13, 2008 11:15 pm
by AndyK
Duh!!! I can be a little thick sometimes...
The Character controller demo left me under the impression that I should be calculating the entire world transform and setting it, your way seems much eaiser, and I expect this will work.
Thank you for your help.
I will post again if this dosen't solve the problem.