Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import nape.hacks.ForcedSleep;
- -----------------------
- implemented, require the objects to already be in a Space
- //force body to go to sleep
- ForcedSleep.sleepBody(body:Body, ?zeroVelocities:Bool=true)
- //force constraint to go to sleep
- ForcedSleep.sleepConstraint(constraint:Constraint)
- //force this body, and every body + constraint connected via constraints to go to sleep
- ForcedSleep.sleepConnected(body:Body, ?zeroVelocities:Bool=true)
- -----------------------
- still to be implemented, shortcuts for adding + sleeping (so more performant)
- ForcedSleep.addAndSleepBody(body:Body, space:Space)
- ForcedSleep.addAndSleepConstraint(constraint:Constraint, space:Space)
- ForcedSleep.addAndSleepCompound(compound:Compound, space:Space)
Advertisement
Add Comment
Please, Sign In to add comment