This uses something that detects whether something is to the left or right of it and whether it should turn left or right to point towards it. this happens to simulate a compass, so the formulas are actually the same for if it is on the right or left, but you could also use this in AI programming, if you don't want it to just face towards you but try to turn so it can see you. you can download this and try to play with the friction, rotvel accelleration, etc. coefficients. this also uses some trig to calculate the direction it wants to point in.