nape.dynamics.Contact

type
class
Contact point for collision interactions

These objects are automatically reused and you should not keep references to them.

Instance Properties

readonly var arbiter : CollisionArbiter

Reference to the CollisionArbiter this contact belongs to

readonly var fresh : Bool

Whether this contact is newly generated, or persistant from previous step.

readonly var friction : Float

+ The specific coeffecient of friction for this contact.

readonly var penetration : Float

+ Penetration of bodies along normal for this contact.

readonly var position : nape.geom.Vec2

+ The world-space position of contact.

Instance Methods

function normalImpulse(body:nape.phys.Body = null):nape.geom.Vec3

+ Evaluate normal reactive impulses for this contact for a given body.

function rollingImpulse(body:nape.phys.Body = null):Float

+ Evaluate rolling friction impulses for this contact for a given body.

function tangentImpulse(body:nape.phys.Body = null):nape.geom.Vec3

+ Evaluate tangent impulses for this contact for a given body.

function totalImpulse(body:nape.phys.Body = null):nape.geom.Vec3

+ Evaluate total contact impulse for a given body.