collinhover/impactplusplus

Speed of Player

Closed this issue · 2 comments

How do I increase the base speed of the Player Entity. I'm trying to transition over to Impact++, but my character is moving very slow - whereas it used to be able to run / etc. I tried looking at the documentation, but I can't find anything...

Thanks,
Tyler

Hi there @tybeck,

the max "grounded" movement speed of characters (the player is a character by the way) is controlled by the maxVelGrounded values of your entity:

https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/abstractities/character.js#L133

But frictionGrounded also plays a role. But just set maxVelGrounded to a higher value on your player for a higher max speed. Beware that you can have different max velocities for climbing, grounded, ungrounded movement. You also have corresponding friction for grounded/ungrounded.

If you want to accelerate faster, have a look at the speed property:

https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/abstractities/character.js#L188

Ahh thank you,

With more sleep; I noticed that I was looking under "tutorial" section, and didn't notice the "ABSTRACTITIES" API Docs for Character. Sorry about that and thanks!