Page 1 of 1

moving platforms ? (irrbullet)

Posted: Wed Jul 23, 2014 10:22 pm
by dark chazz
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

Re: moving platforms ? (irrbullet)

Posted: Sun Aug 03, 2014 5:23 pm
by Gnasty Gnork
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?

Re: moving platforms ? (irrbullet)

Posted: Sun Aug 03, 2014 8:06 pm
by Nadro
BvhTriangleMeshShape supports only static rigid bodies. For rigid body with btBoxShape you must set angular factor to 0.

Re: moving platforms ? (irrbullet)

Posted: Mon Aug 04, 2014 4:29 am
by dark chazz
Nadro wrote:BvhTriangleMeshShape supports only static rigid bodies. For rigid body with btBoxShape you must set angular factor to 0.
Thank you.
I'm on vacation currently away from my development PC, but I will try this as soon as I can.

Re: moving platforms ? (irrbullet)

Posted: Fri Aug 08, 2014 12:48 am
by Granyte
Maybe you should use a kinematic body for what you wanna do
andmov it manualy

Re: moving platforms ? (irrbullet)

Posted: Mon Sep 01, 2014 8:33 pm
by dark chazz
Nadro wrote:BvhTriangleMeshShape supports only static rigid bodies. For rigid body with btBoxShape you must set angular factor to 0.
Alright.
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