This functions set the movement parameters of an entity that uses the CharacterPhysics physics mode.
When an entity uses character physics, the physics will control the object's rotation, and calls to Entity::SetRotation() and similar functions will have no effect.
- void SetInput(const float& angle, const float& move, const float& strafe=0, const float& jump=0, const bool crouch = false, const float maxaccel = 1, const float maxdecel = 0.5, const bool detailed = false, const float maxrotationspeed=5.0)
- angle: the angle the character faces.
- move: the forward movement of the character.
- strafe: the horizontal movement of the character.
- jump: the jumping force to apply.
- crouch: set to true for crouching mode (included for future development)
- maxacceleration: the maximum acceleration the character may use to speed up.
- maxdecelleration: the maximum acceleration the character may use to slow down.
- detailed: set this to true for characters that have a camera mounted on them. This will provide more accurate physics, but will also be more expensive to calculate.
- maxrotationspeed: this is the maximum speed the entity can turn, in degrees per physics step.