Velocity
Last updated
Last updated
This section explains how is the entire process behind the velocity calculation, from the beginning of the cycle until the end (after the simulation).
The CharacterActor component handles three important velocity values during each cycle (FixedUpdate):
This vector is effectively the rigidbody velocity prior to the FixedUpdate call. It is called "Input" velocity since this is the value chosen by the user (gameplay logic).
In order to set up this value you just need to modify the CharacterActor velocity:
Technically speaking, this is the velocity created internally by the CharacterActor component, necessary to determinte the final destination of the character. This value is then fed to the physics simulation (hence the name).
After the simulation is done, the post-simulation velocity is the resulting velocity of the rigidbody. Pre-simulation velocity and post-simulation velocity might be different, especially if the character collided with another rigidbody.
The CharacterActor component allows you to choose which one of the three velocities mentioned before you want to re-assign as post-simulation velocity.
Velocity
Description
Input velocity
This vector is read by the CharacterActor component in order to move from point A to point B.
Pre simulation velocity
Determining the final position might require the input velocity to change. This value is feed to the physics simulation.
Post simulation velocity
After the simulation is done, the velocity might change once again.