Vixen
02b45cc4
csharp
public enum CharacterMoveMode

How a character is moving, which decides what the rules do to its velocity.

Read the guide page for this →

Remarks

A field rather than four systems, because the modes share almost everything — the same acceleration towards the same wanted velocity, differing in what gravity does and what the wanted velocity is built from. Four systems would be four copies of the shared part and four places for a transition to be forgotten.

Swimming is deliberately absent. It needs water volumes, which do not exist — and a mode that could never be entered would be a promise in an enum.

Fields and properties (3)

  • Walking

    On the ground: gravity is cancelled and the ground's own motion is carried.

  • Falling

    In the air: gravity applies and control is reduced to AirAcceleration.

  • Flying

    No gravity, and the look pitch steers. A noclip camera, a drone, a jetpack.

Used by (8)

  • CharacterAnimationThirdPersonShooter
  • PlayerRigThirdPersonShooter
  • RespawnWhenBelowThirdPersonShooter
  • SampleLogThirdPersonShooter
  • CharacterMotionVixen.Physics
  • CharacterMotionTestsVixen.Physics.Tests
  • CharacterSceneTestsVixen.Physics.Tests
  • CharacterStateVixen.Physics