Untitled

mail@pastecode.io avatar
unknown
csharp
2 months ago
427 B
6
Indexable
Never
    //For the camera, it will always follow the Pivot
    public Transform camMoveTarget;
    public float pLerp = .02f;
    public float rLerp = .01f;


    // Update is called once per frame
    void Update()
    {
        transform.position = Vector3.Lerp(transform.position, camMoveTarget.position, pLerp);
        transform.rotation = Quaternion.Lerp(transform.rotation, camMoveTarget, rLerp);
        
    }
Leave a Comment