Hello, im newbie in box2d, plz help me. The problem: I move box with mouse and I need to give impulse to all objects that will be affected by this box. I was surfing on the internet for long time looking for this problem but find nothing (sry for my engl)
Impulse by mouse
JavascriptAre they touching?
If not, user sensor to detect, then apply impulse to the detected object?
If not, user sensor to detect, then apply impulse to the detected object?
Can I post links here?)
First you need to get the body it is in contact with. When you have the body you just need to apply an impulse on that body.
Check this link: http://adf.ly/FxLuT
This is not exactly what you want but this tutorial will be able to help you a lot.
Check this link: http://adf.ly/FxLuT
This is not exactly what you want but this tutorial will be able to help you a lot.
Original thread: https://box2d.org/forum/viewtopic.php?t=8966