Hey, David, I'm not sure how your physics objects populate your screen and how they move, but I use the following to stop my physics objects:
1
2
| myObject.angularVelocity = 0;
myObject:setLinearVelocity(0, 0); |
What Naomi said above will stop the object from moving, but if you have any gravity at all it will be overwritten. The code above will only work if you have physics.setGravity(0, 0).
At least that is my understanding.
You guys are awesome!
I'm not using gravity, so I'll try setting the velocity to zero. Great idea!
Has anyone experimented with .isBodyActive set to false? Perhaps this might work too? I'll have to experiment.
Thank you!
-David
Hey, David, I haven't used isBodyActive property. If you do experiment with it, will you post back the result? I'd be so interested in learning how it might work.
Cheers,
Naomi