Change jump height and forward\\strafe velocity

Change jump height and forward\\strafe velocity

I'm trying to change jump height without success, using 10.0f or 1000.0f i get the same height.
This is what i did to change the jump height:


The same happens with the forward\\backward\\strafe velocity, if i use m_inputUD= 100.0f or 1.0f i get the same velocity.

What do i need to change the jump and walk velocity?

5 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.


To set the walking speed you can use hkpCharacterStateOnGround::setSpeed(...).
m_inputUD is a value between -1 and 1 that signifies a joystick up/down axis value for control input.

The code you've listed is the correct way to change the jump height (I can vertify it works within the demo framework), so I'm not sure why it's not working.

When are you calling it?
Maybe post your character state machine creation code.


Hi, thanks for the quick reply.
Here is the code:

// Create the Character state machine and context
		hkpCharacterState* state;
		hkpCharacterStateManager* manager = new hkpCharacterStateManager();

		state = new hkpCharacterStateOnGround();
		manager->registerState( state,	HK_CHARACTER_ON_GROUND);

		state = new hkpCharacterStateInAir();
		manager->registerState( state,	HK_CHARACTER_IN_AIR);

		state = new hkpCharacterStateJumping();
		manager->registerState( state,	HK_CHARACTER_JUMPING);

		state = new hkpCharacterStateClimbing();
		manager->registerState( state,	HK_CHARACTER_CLIMBING);

		m_characterContext = new hkpCharacterContext( manager, HK_CHARACTER_ON_GROUND );

		// Set character type

and if you need the rest of my code see this post:


I finally found the problem and it's nothing to do with that code, it's a scale problem.
Ogre has a ver big scale and my character had 60 units tall, since Havok 1 unit = 1 meter, my player had 60 meters tall and the level map was even bigger.
After rescaling them, all the changes i make in speed and jump height are visible.

Thanks for the help anyway.

Glad that's working, and thanks for posting your solution.

It might help for someone else with a similar problem - scale problems are easy to overlook.


Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui