Why does it not detect collision

so here is the code:

so sometimes it works some times its not so half of the stuff works the other ones dont with the same code

I don’t know what you’re using to move normalconvayor or even if it moves. I would display the angle of the object in a text object or the debugger to make sure the value is the value you’re expecting. Some systems use 0 to 360 others use -180 to 180 and some calculations aren’t precise thanks to floating point errors and might return 89.99999999 instead of 90. You need to verify the value before attempting to fix it.

  1. You dont need to repeat for each instance
  2. Angle in degrees goes from -180 to 180

. . . . -90
. . . . . A
-180 < > 0
. . . . . v
. . . . 90

well its like a building game and it set with rotation with +90 each time, and it moves the rawironore

That could be the problem. The angle doesn’t wrap around, it keeps going. 0, 90, 180, 270, 360, 450 …

You can use mod() instead of plus 90. Make sure to change the plus to an equals.
Here’s a quick example with another project. Left click adds, right click subtracts. mod() is used to keep it within 0 to 360. Actually, when it’s 360 it becomes zero. So, it’s like 0 to 359.999999999999

aight here is the code:

can i make it so it rotates forever and not just stop at 270 degrees

You should set, not add

1 Like