Can i add 2 collisions detection to one physics body?

As soon as the point of impact moves, you need vector math to figure out where it is, OR as Rob pointed out, use complex bodies so that the parts rotate and you can detect collisions with each individual body.

Your question is interesting however as, if you follow it through and really try to solve it, you’ll find… vector math is the solution.  I’ll stop saying it, but that is the kind of question that leads to learning this.

Cheers,

Ed

I’m planing to really take your code out part by part and see how everything works… Maybe get a book or 2 on vector math… Also maybe some videos… I was just wondering if there isn’t a simpler way?? Without multiple body’s?.. Because it I want multiple body’s to spin then I’d need enterFrame and what if a body lags… That would be bad… RoamingGamer your way is awesome and difficult but I think best.

If you do a search on youtube for “coding math” you’ll get a series of valuable short lessons that include vector math. The lessons are based on javascript but this should not be an issue. The author is a very good teacher.

Thanks for the suggestion!

When Rob said multiple bodies, he didn’t mean discrete display objects, each with its own body somehow linked.  He meant use the multi-body feature of Box2D as implemented by Corona.

Rob mentioned this too:

https://coronalabs.com/blog/2015/07/07/tutorial-treasury-physics-essentials/

See the tutorial on the above page called:  

Multi-element physics bodies