Push dynamic object up along a surface

Post Reply
Zaladen
Posts: 25
Joined: Thu May 14, 2015 10:21 am

Push dynamic object up along a surface

Post by Zaladen »

Hello, I'm new here, and I have a question about bullet. I have a rigid body containing a capsule shape that I can control with my keyboard left and right by adding forces to it, and I have a static box that's rotated 60 degrees. Is there a way to make the capsule body slide up along the surface of the box? Right now it barely slides up at all, and I would want it to be able to do that.

Thanks in advance!
Waschmaschine
Posts: 10
Joined: Wed Apr 15, 2015 9:50 pm

Re: Push dynamic object up along a surface

Post by Waschmaschine »

Zaladen wrote:Hello, I'm new here, and I have a question about bullet. I have a rigid body containing a capsule shape that I can control with my keyboard left and right by adding forces to it, and I have a static box that's rotated 60 degrees. Is there a way to make the capsule body slide up along the surface of the box? Right now it barely slides up at all, and I would want it to be able to do that.

Thanks in advance!
Hey there, I'm also new. What do you mean with a static box rotated 60°? You mean there is a slope of some sort?
Maybe you could lower the gravity or friction for your intents, but a more general way would be to use the btKinematicCharacterController which has a method that might just suit you. Also, Look up the CharacterDemo.

Taken from src\BulletDynamics\Character\btKinematicCharacterController.h:

Code: Select all

/// The max slope determines the maximum angle that the controller can walk up.
	/// The slope angle is measured in radians.
	void setMaxSlope(btScalar slopeRadians);
Zaladen
Posts: 25
Joined: Thu May 14, 2015 10:21 am

Re: Push dynamic object up along a surface

Post by Zaladen »

Yeah exactly, the tilted box creates a slope. I've read about the character controller , but I heard that it doesn't work properly. My teachers in school also told me to try using a dynamic object, so I'm a little bit torn about what I should do.
Zaladen
Posts: 25
Joined: Thu May 14, 2015 10:21 am

Re: Push dynamic object up along a surface

Post by Zaladen »

Noone knows a way to do this? :S
Post Reply