Static variables

@:value(null)staticactive:PhysicsWorld = null

Constructor

@:value({ debugDrawMode : NoDebug, solverIterations : 10, maxSteps : 10, timeScale : 1.0 })new(timeScale:Float = 1.0, maxSteps:Int = 10, solverIterations:Int = 10, debugDrawMode:DebugDrawMode = NoDebug)

Variables

@:value(new Vec4())convexHitNormalWorld:Vec4 = new Vec4()

@:value(new Vec4())convexHitPointWorld:Vec4 = new Vec4()

@:value(new Vec4())hitNormalWorld:Vec4 = new Vec4()

@:value(new Vec4())hitPointWorld:Vec4 = new Vec4()

@:value(10)solverIterations:Int = 10

@:value(1.0)timeScale:Float = 1.0

Methods

@:value({ mask : 0xFFFFFFFF, group : 0x00000001 })convexSweepTest(rb:RigidBody, from:Vec4, to:Vec4, rotation:Quat, group:Int = 0x00000001, mask:Int = 0xFFFFFFFF):ConvexHit

@:has_untypedgetContacts(body:RigidBody):Array<RigidBody>

Used to get intersecting rigid bodies with the passed in RigidBody as reference. Often used when checking for object collisions.

Parameters:

body

The passed in RigidBody to be checked for intersecting rigid bodies.

Returns:

@:value({ mask : 0xFFFFFFFF, group : 0x00000001 })pickClosest(inputX:Float, inputY:Float, group:Int = 0x00000001, mask:Int = 0xFFFFFFFF):RigidBody

@:has_untyped@:value({ mask : 0xFFFFFFFF, group : 0x00000001 })rayCast(from:Vec4, to:Vec4, group:Int = 0x00000001, mask:Int = 0xFFFFFFFF):Hit

Inherited Variables

Defined by Trait

@:value("")name:String = ""

object:Object

Object this trait belongs to.

Inherited Methods

Defined by Trait

notifyOnAdd(f:() ‑> Void):Void

Trait is added to an object.

notifyOnInit(f:() ‑> Void):Void

Object which this trait belongs to is added to scene.

notifyOnLateUpdate(f:() ‑> Void):Void

Add late game logic handler.

notifyOnRemove(f:() ‑> Void):Void

Object which this trait belongs to is removed from scene.

notifyOnRender(f:Graphics ‑> Void):Void

Add render handler.

notifyOnRender2D(f:Graphics ‑> Void):Void

Add 2D render handler.

notifyOnUpdate(f:() ‑> Void):Void

Add game logic handler.

remove():Void

Remove the trait from the object.

removeLateUpdate(f:() ‑> Void):Void

Remove late game logic handler.

removeRender(f:Graphics ‑> Void):Void

Remove render handler.

removeRender2D(f:Graphics ‑> Void):Void

Remove 2D render handler.

removeUpdate(f:() ‑> Void):Void

Remove game logic handler.