RigidBodyComponent: {
    angularDamping: number;
    angularFactor: number[];
    enabled: boolean;
    friction: number;
    linearDamping: number;
    linearFactor: number[];
    mass: number;
    restitution: number;
    type: string;
}

RigidBody Component Properties.

Type declaration

  • angularDamping: number

    Controls the rate at which a body loses angular velocity over time.

    0
    
  • angularFactor: number[]

    An array of 3 numbers that represents the scaling factor for angular movement of the body in each axis.

    [1,1,1]
    
  • enabled: boolean

    Whether the component is enabled.

    true
    
  • friction: number

    The friction value used when contacts occur between two bodies.

    0.5
    
  • linearDamping: number

    Controls the rate at which a body loses linear velocity over time.

    0
    
  • linearFactor: number[]

    An array of 3 numbers that represents the scaling factor for linear movement of the body in each axis.

    [1,1,1]
    
  • mass: number

    The mass of the body.

    1
    
  • restitution: number

    The amount of energy lost when two objects collide, this determines the bounciness of the object.

    0.5
    
  • type: string

    The type of RigidBody determines how it is simulated. Can be one of: static, dynamic, kinematic.

    "static"