Closed GoogleCodeExporter closed 8 years ago
I'm sorry, I just realized that the description is missing an explanation for
what is going on in the provided demo.
In the demo I've got one regular rigid body, and one kinematic rigid body. I'm
moving the kinematic rigid body towards the regular rigid body each frame, so
that it pushes the regular rigid body.
I also have a CollisionResolver class that's a btActionInterface. It's a much
simplified version of the "resolve collision" part of the
btKinematicCharacterController.
So each frame the kinematic object is placed inside the other object, then
bullet resolves the collision for the other object, the CollisionResolver
resolves the collision for the kinematic object, and like that the regular
object is pushed across the screen.
Except that at some point it breaks. If you uncomment line 58 in BasicDemo.cpp
then it no longer breaks.
Original comment by malteska...@gmail.com
on 30 Sep 2011 at 3:24
A kinematic object should always have mass 0. Some assert/warning should be
added.
Can you try if setting the mass to zero fixes the problem?
Original comment by erwin.coumans
on 3 Oct 2011 at 6:45
Yes, if I set the mass to 0 it does not break any more. However this is not my
expected behavior. I want a kinematic object to be able to push other things
around. And in order to tell bullet how strongly I want it to push things, it
needs to have a mass.
Specifically what I'm doing is that I'm speeding up or slowing down the world
(by changing the fixed time step parameter of stepSimulation()) while player
controlled objects are kinematic and continue to be positioned at regular
speed. So I can slow the world down and still move around at regular speed. In
order for objects to then react correctly to me I need to have a mass.
I think that kinematic objects should be able to have a mass. I think that to
allow this, you simply have to reset m_deltaLinearVelocity each frame.
Original comment by malteska...@gmail.com
on 8 Oct 2011 at 7:40
OK, I agree with you and fix it before next release.
Original comment by erwin.coumans
on 12 Oct 2011 at 8:39
It should be fixed by now
http://code.google.com/p/bullet/source/detail?r=2645
Original comment by erwin.coumans
on 21 Aug 2013 at 11:07
Original issue reported on code.google.com by
malteska...@gmail.com
on 25 Sep 2011 at 10:16Attachments: