Chipmunk2D Unity Documentation | Main Page | Forum

Manual

Tutorials

API

Classes

Structs

Enumerations

ChipmunkBody.ApplyImpulse()

function ApplyImpulse(impulse : Vector2, localPosition : Vector2) : void

Parameters


impulseThe impulse to apply to the body.
localPositionThe position in the transform's local coordinates to apply the impulse at.

Description

Apply an impulse on the body at the given point in the transform's local coords.

Impulses are (nearly) instantaneous forces that act very rapidly on an object. You would use an impulse to model something like a cannon's recoil or applying a hand calculated impact value. In Chipmunk, an impulse is immediately to a rigid body's velocity. Units are mass*velocity, same as momentum.