Vixen
02b45cc4
csharp
public struct RigidBody

Makes an entity's collider move: under the solver, or under whoever owns it.

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

As a scene component

Size
32 bytes — 372 rows in a 16 KB chunk, alone on the archetype

Remarks

Only meaningful beside a Collider. On its own it does nothing, because there is nothing to simulate — which is the same rule WorldTransform has about LocalTransform, and for the same reason.

Fields and properties (8)

  • public BodyMotion Motion

    How it moves.

  • public BodyMotionQuality MotionQuality

    How carefully its motion is swept.

  • public float Mass

    Its mass in kilograms, or zero to take the shape's.

  • public float GravityFactor

    How much of the world's gravity applies.

  • public float LinearDamping

    How quickly linear motion bleeds away, per second.

  • public float AngularDamping

    How quickly angular motion bleeds away, per second.

  • public BodyDegreesOfFreedom DegreesOfFreedom

    Which axes it may move and turn about.

  • public bool AllowSleeping

    Whether it may fall asleep when it stops moving.

Methods (2)

  • public static RigidBody Dynamic()

    A dynamic body with the engine's defaults.

  • public static RigidBody Kinematic()

    A kinematic body — moved by its owner, and pushing whatever is in the way.

Used by (6)

  • ComponentRegistrationVixen.Physics
  • PhysicsSceneVixen.Physics
  • PhysicsSceneComponentTestsVixen.Physics.Tests
  • PhysicsSceneTestsVixen.Physics.Tests
  • PhysicsSyncSystemVixen.Physics
  • Vixen_Physics_Ecs_RigidBodySerializerVixen.Physics