浏览代码

Improved FollowPositionRIg for UnityEvent usage

/main
Thomas ICHÉ 6 年前
当前提交
7d689d99
共有 1 个文件被更改,包括 11 次插入3 次删除
  1. 14
      Runtime/Rigs/FollowPositionRig.cs

14
Runtime/Rigs/FollowPositionRig.cs


public class FollowPositionRig : MonoBehaviour
{
public Transform Target;
public Transform target => m_Target;
[SerializeField]
protected Transform m_Target;
if(Target != null)
if(m_Target != null)
var delta = Target.position - transform.position;
var delta = m_Target.position - transform.position;
}
public void SetTarget(Transform target)
{
m_Target = target;
}
}
正在加载...
取消
保存