The bots in my game should be able to rotate until they face to a point, but i dont know how i could do it. They should easily adjust their heading in degrees until they face to the player (point), i dont need look up/down.
I think that are enough informations to perform it. Could somebody please post the code, because i dont understand the vector/dotproduct stuff.
Of course, this will be in radians. OpenGL accepts arguments in degrees (I don't know about Direct3d). So, depending on whether your rotation function takes degrees or radians, you may need to convert the return of atan2 to degrees. That is accomplished by multiplying by a conversion factor. That conversion factor is 180/PI . Similarly, if you ever need to convert degrees to radians, multiply by PI/180. Of course, multiplication by one is the same as division by the other.
Edited by - TerranFury on August 19, 2001 8:17:56 PM