Vixen
02b45cc4
csharp
public enum BodyDegreesOfFreedom

Which axes a body is allowed to move and turn about.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A 2D game is Plane2D; an upright character that must not topple is Translation with the rotations left out. Locking a degree of freedom here rather than by zeroing velocity every step means the solver never generates the motion in the first place, so a stack of constrained bodies does not fight itself.

Fields and properties (11)

  • None

    Nothing. The body cannot move at all, though it is still solved against.

  • TranslationX

    May move along X.

  • TranslationY

    May move along Y.

  • TranslationZ

    May move along Z.

  • RotationX

    May turn about X.

  • RotationY

    May turn about Y.

  • RotationZ

    May turn about Z.

  • Translation

    May move along any axis.

  • Rotation

    May turn about any axis.

  • All

    Everything. The default.

  • Plane2D

    The X–Y plane, turning only about Z. What a 2D game wants.

Used by (7)

  • BodyDescriptionVixen.Physics
  • PhysicsSceneVixen.Physics
  • PhysicsWorldVixen.Physics
  • PhysicsWorldTestsVixen.Physics.Tests
  • RigidBodyVixen.Physics
  • Vixen_Physics_Bodies_BodyDescriptionSerializerVixen.Physics
  • Vixen_Physics_Ecs_RigidBodySerializerVixen.Physics