13 lines
254 B
C#
13 lines
254 B
C#
![]() |
using UnityEngine;
|
|||
|
|
|||
|
public class SimpleAttachCamera : MonoBehaviour
|
|||
|
{
|
|||
|
public Transform AttachTo;
|
|||
|
public Vector3 Offset;
|
|||
|
|
|||
|
void LateUpdate()
|
|||
|
{
|
|||
|
transform.position = AttachTo.position + AttachTo.TransformDirection(Offset);
|
|||
|
}
|
|||
|
}
|