Options
All
  • Public
  • Public/Protected
  • All
Menu

The rigidbody component is used to apply forces to an entity and detect collisions.

Hierarchy

Index

Constructors

constructor

Properties

acceleration

acceleration: Vector2 = ...

The rigidbody acceleration.

enabled

enabled: boolean

Is the component enabled.

entity

entity: Entity

Entity that this component is attached to.

friction

friction: number = 1

Friction of the rigidbody.

useGravity

useGravity: boolean = true

Gravity should be applied to the rigidbody.

velocity

velocity: Vector2 = ...

The rigidbody velocity.

Accessors

id

  • get id(): string

Methods

addForce

awake

  • awake(): void

lateUpdate

  • lateUpdate(): void

start

  • start(): void

update

  • update(): void

Generated using TypeDoc