public void OverrideLookAtPosition(LookAtPositionParams param, short priority, string id) { if (param.ReferenceTransform == null) { Debug.Log("Reference look transform is null, looking at failed"); return; } LookAtTypeDict.Override(id, priority, param); if (LookAtTypeDict.LastId == id) { ToLookAtPosition(param); } }
private void ToLookAtPosition(LookAtPositionParams param) { currentReferenceTransform = param.ReferenceTransform; lookAtTransform = null; StartToLookAt(param.LookAtPosition); if (param.LookAtStyleIndex >= 0) { SetLookAtIKStyle(param.LookAtStyleIndex); } else { SetLookAtIKStyle(player.defaultLookAtIKStyleIndex); } }