Orthographic Smooth Follow

How would I make the smooth follow script forget everything about rotation and just have it follow in two dimensions? And also, is there a way to make it follow only when the target nears the edges of the screen without using trigger colliders? Thanks!

Sounds like you just want to set the camera at a constant position relative to the player? Diablo-style?

var target : Transform;
var offset : Vector3 = Vector3(5, 5, -5);

function LateUpdate() {
transform.position = target.position + offset;
transform.LookAt(target.position);
}

Try this:

46098–1674–$camera_2dunitypackage_162.zip (5.1 KB)

Daniel, you are a genius. :slight_smile: That’s exactly what I was looking for. Thanks again guys!