This project has moved and is read-only. For the latest updates, please go here.

Randomly place object - collision problems

Topics: Developer Forum
Dec 4, 2007 at 5:59 AM
I'm trying to randomly place an object in my playing field. However, sometimes it intersects with something that is already there and the objects get stuck together!

My current approach is to run the simulation for a very small amount of time and detect if anything has hit that object by using a collision handler.

However, this isn't working very well, any suggestions? I would like to know if the object would collide with anything before I place it on the map!
Dec 4, 2007 at 6:00 AM
Oh, thanks in advance, I'm having lots of fun with the engine!
Dec 4, 2007 at 5:36 PM
I'm not sure on this. Possibly just check the AABB's against each other prior to adding? What you are doing should work too, not sure why it's not.