Options
All
  • Public
  • Public/Protected
  • All
Menu

Add this component to an entity to apply a custom impulse on the entity. After simulation occurs in the next frame, this component is removed from the entity automatically.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • Optional point: Vector2
    • Optional impulse: Vector2
    • Optional scaleImpulse: boolean

    Returns AddImpulse2D

Properties

impulse

impulse: Vector2

Specifies the direction and magnitude of the impulse.

point

point: Vector2

Specifies the point to which the impulse is applied, in the entity's local space.

scaleImpulse

scaleImpulse: boolean

If true, the impulse is scaled by Transform2d scale.

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static cid

cid: number

Static impulse

Static point

Static scaleImpulse

scaleImpulse: ComponentFieldDesc

Methods

Static _dtorFn

  • Parameters

    Returns void

Static _fromPtr

Static _tempHeapPtr

  • Parameters

    Returns number

Static _toPtr

  • Parameters

    Returns void

Generated using TypeDoc