As the title says, I'm trying to create moving platforms that the player must jump on top of.
I'm using irrbullet for my game and I'm having difficulty...
I tried setting the platform mesh as a BvhTriangleMeshShape, but it cannot be moved with "setLinearVelocity"
I tried setting it as a BoxShape and setting its gravity to zero, which worked, but as soon as I jump on it, it rotates and falls...
any advice on how to properly do it ?
thanks
moving platforms ? (irrbullet)
-
- Posts: 18
- Joined: Fri Jun 20, 2014 12:12 pm
Re: moving platforms ? (irrbullet)
Hm what happens if you parent the pg to the platform only when the pg is standing on it?
What is that falls? The pg or the platform?
What is that falls? The pg or the platform?
Re: moving platforms ? (irrbullet)
BvhTriangleMeshShape supports only static rigid bodies. For rigid body with btBoxShape you must set angular factor to 0.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
-
- Posts: 26
- Joined: Tue Nov 11, 2008 5:20 pm
Re: moving platforms ? (irrbullet)
Thank you.Nadro wrote:BvhTriangleMeshShape supports only static rigid bodies. For rigid body with btBoxShape you must set angular factor to 0.
I'm on vacation currently away from my development PC, but I will try this as soon as I can.
Re: moving platforms ? (irrbullet)
Maybe you should use a kinematic body for what you wanna do
andmov it manualy
andmov it manualy
-
- Posts: 26
- Joined: Tue Nov 11, 2008 5:20 pm
Re: moving platforms ? (irrbullet)
Alright.Nadro wrote:BvhTriangleMeshShape supports only static rigid bodies. For rigid body with btBoxShape you must set angular factor to 0.
I have set the angular factor to 0 and also adjusted the linear factor depending on which axis the platform is moving on, and now everything works correctly.
Thanks