a beginner question but i did not find it:
The smooth look-at how could i fix it to rotate only the Y-Axis ?
var target : Transform;
var damping = 2.0;
function LateUpdate () {
var rotation = Quaternion.LookRotation(target.position - transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * damping);
}
I want the Objekt to rotate into my direction, but not to look up&down