Vixen
dd8b0a81
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.

⚠ Appended, never reordered. This is a byte in a component and therefore in every saved scene and on the wire; inserting a member renumbers the ones after it, and a scene saved before the change loads with its characters flying.

Fields and properties (4)

  • 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.

  • Swimming

    In water: buoyancy replaces gravity, and the look pitch steers the dive.

Used by (10)

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