I've been trying to decidem how to implement patrolling enemies in my game. These enemies are simply squares which move either along the x axis at a certain velocity, or the y axis. All i want them to do is turn around as they hit a static ground object.
Everything i want the square to do points towards kinematic, except for colliding with the static ground object. As such i made the square dynamic, didn't put any gravity and it works fine to an extent but the rotation on the square gets messed up and it
changes speed sometimes when it collides with a wall.
Anyone got any reccomendations on a better way of doing this or improving the way it's working currently?
Thanks in advance!