Options
All
  • Public
  • Public/Protected
  • All
Menu

Class b2RigidBody2D

Hierarchy

  • b2RigidBody2D

Implements

Index

Properties

_animatedAngle

_animatedAngle: number = 0

_animatedPos

_animatedPos: Vec2 = new Vec2()

Private _body

_body: b2.Body | null = null

Private _inited

_inited: boolean = false

Private _rigidBody

_rigidBody: RigidBody2D

Accessors

imp

  • set imp(v: b2.Body | null): void

impl

isAwake

  • get isAwake(): boolean

isSleeping

  • get isSleeping(): boolean

rigidBody

Methods

destroy

  • _destroy(): void

init

  • _init(): void

onNodeTransformChanged

  • onNodeTransformChanged(type: any): void

registerNodeEvents

  • _registerNodeEvents(): void

unregisterNodeEvents

  • _unregisterNodeEvents(): void

animate

  • animate(dt: number): void

applyAngularImpulse

  • applyAngularImpulse(impulse: number, wake: boolean): void

applyForce

applyForceToCenter

  • applyForceToCenter(force: IVec2Like, wake: boolean): void

applyLinearImpulse

applyLinearImpulseToCenter

  • applyLinearImpulseToCenter(impulse: IVec2Like, wake: boolean): void

applyTorque

  • applyTorque(torque: number, wake: boolean): void

getAngularVelocity

  • getAngularVelocity(): number

getInertia

  • getInertia(): number

getLinearVelocity

  • getLinearVelocity<Out>(out: Out): Out

getLinearVelocityFromWorldPoint

  • getLinearVelocityFromWorldPoint<Out>(worldPoint: IVec2Like, out: Out): Out

getLocalPoint

  • getLocalPoint<Out>(worldPoint: IVec2Like, out: Out): Out

getLocalVector

  • getLocalVector<Out>(worldVector: IVec2Like, out: Out): Out

getMass

  • getMass(): number

getWorldPoint

  • getWorldPoint<Out>(localPoint: IVec2Like, out: Out): Out

getWorldVector

  • getWorldVector<Out>(localVector: IVec2Like, out: Out): Out

initialize

isActive

  • isActive(): boolean

onDestroy

  • onDestroy(): void

onDisable

  • onDisable(): void

onEnable

  • onEnable(): void

resetVelocity

  • resetVelocity(): void

setActive

  • setActive(v: boolean): void

setAllowSleep

  • setAllowSleep(v: boolean): void

setAngularDamping

  • setAngularDamping(v: number): void

setAngularVelocity

  • setAngularVelocity(v: number): void

setFixedRotation

  • setFixedRotation(v: boolean): void

setGravityScale

  • setGravityScale(v: number): void

setLinearDamping

  • setLinearDamping(v: number): void

setLinearVelocity

setType

sleep

  • sleep(): void

syncPositionToPhysics

  • syncPositionToPhysics(enableAnimated?: boolean): void

syncRotationToPhysics

  • syncRotationToPhysics(enableAnimated?: boolean): void

wakeUp

  • wakeUp(): void

Generated using TypeDoc