kinematic character jump

haba
Posts: 21
Joined: Sun Oct 12, 2008 3:38 pm

kinematic character jump

Post by haba »

Hi,

I'm using btKinematicCharacterController for my character, I noticed you have a jump() method, but it's not implemented. Can anyone give me any pointers on how this might be done? since I'm using only a ghost object, I can't use applyForce or setLinearVelocity...

Thanks!
mp3butcher
Posts: 13
Joined: Wed Jun 06, 2007 8:05 am

Re: kinematic character jump

Post by mp3butcher »

I'm not sure but since character controller is kinematic and not dynamic you cant apply physics rules on it....
Tell me if im wrong...
haba
Posts: 21
Joined: Sun Oct 12, 2008 3:38 pm

Re: kinematic character jump

Post by haba »

mp3butcher wrote:I'm not sure but since character controller is kinematic and not dynamic you cant apply physics rules on it....
Tell me if im wrong...
You're right, I can't. So, should I use the dynamic character, or are there any suggestions on how to get a decent jump on a kinematic character?

Thanks!
User avatar
John McCutchan
Posts: 133
Joined: Wed Jul 27, 2005 1:05 pm
Location: Berkeley, CA

Re: kinematic character jump

Post by John McCutchan »

To perform a jump using the kinematic character controller, you need to explicitly control the character's position. So you need to keep track of some state: how long the jump button has been pressed, position of character when they started jumping. Then you can move the character over an arc or something more complex based on user input during the jump.

HTH,
John