objects do not inherit transform of collision objects

edtheknife
Posts: 1
Joined: Mon Jul 05, 2010 12:14 pm

objects do not inherit transform of collision objects

Post by edtheknife »

Hi, together!

For a production we plan to begin in close future, i am testing bullet. It looked like the perfect tool to me when i came across the following setup.

A passive plane starts to move (keyframed?) after a number of active cubes hit the ground and came to lie still.
Unfortunately, the cubes do not move with the plane. They remain where they are while the plane moves under them. If the plane moves on so that the end of it moves under the cubes they simply fall down ...

Is there something i am missing?
Is there a workaround for that?

Thanks in advance,

//ed
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: objects do not inherit transform of collision objects

Post by dphil »

So the cubes correctly hit the plane when they fall and come to a stop? And you want to have them "pulled" along with the plane when the plane moves, but they don't budge until the plane moves out from under them, at which point they fall?

Well it sounds like the basic collision detection is working properly, so the only thing that comes to my mind is friction. I haven't played too much with friction, but I imagine if you have it set to 0 on your objects, the plane might just slide out from under the cubes without pulling them along (like in your simulation). You could try setting friction to something higher, like 1.
Also, are you only moving the plane horizontally? You could try moving it vertically to make sure the cubes properly move up/down with it (which would even more point towards a friction issue).

On a related note, how are you moving your plane? If you are manually transforming a graphics component for it, make sure you update the associated collision shape (rigid body, I assume) as well. But additionally, if you are manually "teleporting" the plane sideways by small increments to simulate movement, there would be no forces applied that would cause the cubes to move along with it anyway. If you are in fact manually transforming the plane, you could instead try applying a sideways force via the physics engine (rigidBody->applyForce(...) or applyCentralForce(...) or something like that) to make sure all forces are simulated properly.