Random spawn position, colliding?

Discuss issues specific to the Flash/AS3 port of Box2D
Posts: 1
Joined: Thu Aug 30, 2012 4:10 pm

Random spawn position, colliding?

Postby janh » Thu Aug 30, 2012 4:20 pm


When a player enters the game, I generate a random spawning position for him. How can I make sure this position does not collide with any other object in the world? If the position is not valid, I generate a new one and have to verify this one as well. This keeps going until a valid position has been found...


Return to “Flash”

Who is online

Users browsing this forum: No registered users and 2 guests