For an FPS game.
First: I want to rotate a character ON ONE AXIS (the y axis specifically). I have a character and I want it to look at me constantly (by rotating on one axis). I’ve been able to get him to rotate, but whenever I get real close to him, he begins to rotate on the other axes (it’s almost as if he’s dodging bullets in the Matrix). How would I make him rotate ONLY on the Y axis.
Second:
I have two objects, say A and B (stationary). I rotate A so it looks at the transform of B. I want to make A go STRAIGHT to B, i.e. I want A to walk to B in a straight line, not left/right then forward/backwards. How can you do this through scripting. I believe you can just do it by changing two variables of the Vector3 position every frame, but is there a better way?