I’ve set up a linetrace that works. (only the color doesn’t change should be green but it stays red)
I know that it works because I tested it with print strings.
When the fly character hits the wall I want to rotate it 90deg:
Everything I’ve tried didn’t work out. I’ve read that this could be something called gimbal lock.
I’ve tried looking up “gimbal lock” but it seem very complicated. Most of what I found was for 3D making it even more complicated. Like:
I don’t even know if this is a gimbal lock problem, I’ve tried many different rotations and all of them showed the same result: the sprite not rotating.