public struct CharacterStateWhere a character is in its own motion. Derived every step.
Remarks
Not [DataContract], so no scene can carry one — the argument CameraShot makes: a file recording half a coyote window would reload into the middle of a motion nobody asked for. The bridge attaches it to any character that has not got one.
Every timer is here rather than in a field on a system, and that is what makes the motion replayable. A rollback restores the world; anything the rule reads that the world does not hold is something that will be different the second time, and the symptom is a player who mispredicts on a connection with no loss at all ([16](../../../docs/plan/16-networking.md) § Prediction).
Fields and properties (8)
public CharacterMoveMode ModeWhat the rules are currently doing to it.
public CharacterGround GroundWhat it is standing on, as of the last step.
public Vector3 VelocityHow fast it is moving, in metres a second, relative to whatever it is standing on.
public float CoyoteRemainingHow much longer a jump will still work after leaving the ground, in seconds.
public float JumpBufferRemainingHow much longer a jump press will be remembered, in seconds.
public bool JumpHeldWhether the jump button was held at the end of the last step.
public bool IsCrouchingWhether the character is crouched — which may be because it cannot stand up.
public readonly bool IsGroundedWhether it is on ground it can stand on.
Used by (9)
- CharacterAnimationThirdPersonShooter
- PlayerRigThirdPersonShooter
- RespawnWhenBelowThirdPersonShooter
- CharacterAllocationTestsVixen.Physics.Tests
- CharacterMotionVixen.Physics
- CharacterMotionTestsVixen.Physics.Tests
- CharacterMovementSystemVixen.Physics
- CharacterSceneTestsVixen.Physics.Tests
- PhysicsSceneVixen.Physics