Restricting movement of a RigidBody onto an arbitrary plane.
Posted: Thu Jun 19, 2014 3:33 am
I am currently working on a 2.5D game that locks rigid bodies to a plane using the Linear Factor on each rigid body. The issue that comes with using this simple feature is that the plane you can restrict movement to using it has to be axis aligned. As the title says, I want to be able to move objects along an arbitrary plane as seemlessly as possible similar to how the Linear Factor allows movement.
Implementing this seems like it could be somewhat straight forward. In the same place that Linear Factor is applied to the calculated force for a rigid body (in the constraint solver), instead of multiplying by the linear factor the movement vector can be projected onto a user defined plane that is object centered and world oriented. Since it is object centered, the plane can be expressed as just a normal.
Now, I have a few questions about this:
1) If I were to implement this, how likely would it be to be integrated into the Bullet library? I really don't want to have to maintain a patch indefinitely, and the issue tracker seems to move incredibly slow(I base this on having a different issue that is 11 months old and has yet to be acknowledged).
2) As near as I can tell, something like this and the Linear Factor is mutually exclusive. Is giving the axe to the Linear Factor out of the question? If so, does prioritizing the arbitrary axis and if it is not set then resort to the Linear Factor sound sane?
3) Is there anything related to this task that I should be made aware of? Has anyone attempted this behavior in this way? Better...is this a feature that exists or is planned already for Bullet 3?
Implementing this seems like it could be somewhat straight forward. In the same place that Linear Factor is applied to the calculated force for a rigid body (in the constraint solver), instead of multiplying by the linear factor the movement vector can be projected onto a user defined plane that is object centered and world oriented. Since it is object centered, the plane can be expressed as just a normal.
Now, I have a few questions about this:
1) If I were to implement this, how likely would it be to be integrated into the Bullet library? I really don't want to have to maintain a patch indefinitely, and the issue tracker seems to move incredibly slow(I base this on having a different issue that is 11 months old and has yet to be acknowledged).
2) As near as I can tell, something like this and the Linear Factor is mutually exclusive. Is giving the axe to the Linear Factor out of the question? If so, does prioritizing the arbitrary axis and if it is not set then resort to the Linear Factor sound sane?
3) Is there anything related to this task that I should be made aware of? Has anyone attempted this behavior in this way? Better...is this a feature that exists or is planned already for Bullet 3?