Checking the position of the object

Hello everyone!
There are three objects in my scene: a cylinder, a cube, and a sphere
The cylinder and the sphere can be moved with the mouse
When a cylinder or sphere falls into certain coordinates, they are assigned a new position in the scene.

I cannot make it so that the sphere is installed first, and only then the cylinder, that is, if the sphere has not yet been set to position (0, 5, 0), then the cylinder cannot be set to position (0, -5, 0)

I tried using the if statement, but it didn’t work.

What can help?

@Mal0spal it works with ifs

1 Like