How to make an object not be created on the map on top of another object?

Asked

Viewed 81 times

0

I have an object that is created randomly by the map, and that makes it be created on top of the other objects on the map... How to make it not be created on top of these other objects, but only where the map is empty?

1 answer

0

1 - The solution would be you create an object (Sprite) of the same size as your character who checks if he is on top of another object before him "spawnar" its main object.

2 - For this you can create a group for the objects that cannot be below and then do the verificador verificar xD

3 - If Object is Overlaping Another Object in case the "Grupo de Objetos" then your "verificador" randomize again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.