Is it possible to check if a certain body is colliding with another at any given moment, without using events? [import]uid: 5833 topic_id: 4984 reply_id: 304984[/import]
If you want a rough estimate, use the usual distance calculation (check the recent posts for the code if you need to, but it’s basically the typical hypoteneuse) to see if two objects are closer than both their radius added together. That really only works for objects which are either almost always round or in which you can use reference points - ie: place objects within your display groups and check distances from them so you’re not using one central point from within, say, a person type shape.
matt [import]uid: 8271 topic_id: 4984 reply_id: 16250[/import]
Here’s a thread which has the code you’d be looking for: http://developer.anscamobile.com/forum/2010/11/17/math-helper-functions-distancebetween-and-anglebetween [import]uid: 8271 topic_id: 4984 reply_id: 16251[/import]
Thanks for the idea and link, I will give it a try after work and see what I can do. [import]uid: 5833 topic_id: 4984 reply_id: 16287[/import]