20 lines
440 B
C#
20 lines
440 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Cinemachine;
|
|
using UnityEngine;
|
|
|
|
public class DollyOffset : MonoBehaviour
|
|
{
|
|
public CinemachineDollyCart cart;
|
|
public CinemachineDollyCart targetCart;
|
|
public float offset;
|
|
|
|
// Update is called once per frame
|
|
void LateUpdate()
|
|
{
|
|
if (cart == null || targetCart == null) return;
|
|
|
|
cart.m_Position = targetCart.m_Position + offset;
|
|
}
|
|
}
|