So I’m working on a dual stick shooter as a side project, and I ran into a problem. Everything was working fine , but know I have to figure out the camera. Now I’m trying to get the camera to follow the players position, but not rotate with the player. I’ve been working on it all day and can’t come up with anything that works. Any help?
EDIT: Ok I got it working here’s the code for anyone interested.
var target : Transform;
var Pos : Vector3;
var Height : float;
var Distance : float;
function Update(){
Pos.x = target.transform.position.x;
Pos.y = target.transform.position.y + Height;
Pos.z = target.transform.position.z - Distance;
transform.position = Pos;
}