base class —
A wrapper to expose character physics options.
Whether or not the character is on the ground. (read-only)
The gravity value used for the character.
The character falling speed.
The maximum number of jumps a character can perform before having to touch the ground. By default this is set to 1. 2 allows for a double jump, etc.
Type: int in [0, 255], default 1
The current jump count. This can be used to have different logic for a single jump versus a double jump. For example, a different animation for the second jump.
The character jumping speed.
The maximum slope which the character can climb.
The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.
Type: Vector((x, y, z))
The character jumps based on it’s jump speed.
setVelocity(velocity, time, local=False)¶
Sets the character’s linear velocity for a given period.
This method sets character’s velocity through it’s center of mass during a period.
- velocity (3D Vector) – Linear velocity vector.
- time (float) – Period while applying linear velocity.
- local (boolean) –
- False: you get the “global” velocity ie: relative to world orientation.
- True: you get the “local” velocity ie: relative to object orientation.
Resets the character velocity and walk direction.