Constant rotation/speed

Dec 29, 2011 at 5:57 PM

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!

Dec 31, 2011 at 1:29 PM

Problem solved. Got too stuck in using Farseer to realise I didn't need it all for what I wanted too do!