I have a platform with btBoxShape as shape, and I want to rotate it every certain amount of time to simulate a rotating platform.
Right now I rotate it with Ogre (my rendering engine) and use a custom btMotionState to synchronize it with bullet. The thing is that when a player goes on top of it (a player is a btRigidBody with mass 1) the body should stay in the same coordinate relative to the platform and rotate with it. Right now it is kinda bugged and it doesn't rotate properly, and I don't know the exact cause.
What should I do to achieve this effect?
Here is a video with an example of what I want to do: http://youtu.be/z60jiGldX48?t=1m2s
Thanks!
Stick 2 btRigidBodies together
-
- Posts: 109
- Joined: Tue May 01, 2012 10:42 am
Re: Stick 2 btRigidBodies together
One thing you could try is to animate the platform using bullet by setting angular velocity. The also set high friction on both platform and object.
However, not sure how well it will work, and if you use a kinematic character, it wont work. Then you should probably do it manually.
However, not sure how well it will work, and if you use a kinematic character, it wont work. Then you should probably do it manually.
-
- Posts: 26
- Joined: Sat Jun 15, 2013 2:29 am
Re: Stick 2 btRigidBodies together
The thing is that this is a flying platform with mass 0 (as it is almost static). If I set an angular velocity it won't move as the body mass is 0. Is there a way to disable linear movement?STTrife wrote:One thing you could try is to animate the platform using bullet by setting angular velocity. The also set high friction on both platform and object.
However, not sure how well it will work, and if you use a kinematic character, it wont work. Then you should probably do it manually.
-
- Posts: 109
- Joined: Tue May 01, 2012 10:42 am
Re: Stick 2 btRigidBodies together
I don't think there is an easy way to do this if your platform is kinematic.
What you could try is to make the platform a fairly heavy (but not extreme) rigidbody, and use constraints to keep it in it's place (possibly a hinge constraint, and I guess you should attach the other end to a kinematic body). And ofcourse set the friction.
What you could try is to make the platform a fairly heavy (but not extreme) rigidbody, and use constraints to keep it in it's place (possibly a hinge constraint, and I guess you should attach the other end to a kinematic body). And ofcourse set the friction.