1
Ask a Question / Create object if the object won't touch another object
« on: February 02, 2013, 02:05:04 pm »
I'm trying to work on a game where you build towers. However, I can't figure out how to make it so that a tower won't be created on top of another tower. I have attached what I have so far (I have only included 1 tower for simplicity), but this only will refuse to make a tower if the mouse is on top of another tower. If it is just above-left of the tower, it will create another tower on top of it (I have physics turned off, so they will not collide). I could create another object at the four corners of the tower to be created and see if those collide, but I'm sure there is a better way that does not cause as much game lag.