Getting stuck on a btStaticPlane

regen
Posts: 2
Joined: Wed Aug 13, 2008 8:58 am

Getting stuck on a btStaticPlane

Post by regen »

Hi all,

I'm fairly new to bullet, and have just been trying some basic things out to get the hang of it. I have some boxes constrained by some btStaticPlaneShapes, and am applying an impulse using

Code: Select all

applyCentralImpulse(ForceVector);
Everything works perfectly until the box settles into a stationary position. After that it won't budge off of the ground plane when I apply an impulse, and only comes loose if it collides with another object.

Am I doing something wrong, or is this a bug with either the box or plane object?

[EDIT]

...or is there a flag I have to unset to tell the engine that my stationary object is moving again?
regen
Posts: 2
Joined: Wed Aug 13, 2008 8:58 am

Re: Getting stuck on a btStaticPlane

Post by regen »

I'll reply to my question with the answer (admins feel free to delete the whole thread)

The collision object was using motionstates, so when the box came to a stationary state, it's activation state was changed to ISLAND_SLEEPING.

In order to get the box moving again, I had to run

Code: Select all

setActivationState(1)
hope this helps anyone else who has the issue!