Skip to content

Commit

Permalink
Main layer search
Browse files Browse the repository at this point in the history
  • Loading branch information
SDraw committed Jan 21, 2023
1 parent e633fc6 commit 5c7442d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ml_pam/ArmMover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ class ArmMover : MonoBehaviour
static readonly Quaternion ms_rotationOffset = Quaternion.Euler(0f, 0f, -90f);

Animator m_animator = null;

int m_mainLayer = -1;
CVRPickupObject m_target = null;
Matrix4x4 m_offset = Matrix4x4.identity;

void Start()
{
m_animator = PlayerSetup.Instance._animator;
m_mainLayer = m_animator.GetLayerIndex("Locomotion/Emotes");
}

void OnAnimatorIK(int p_layerIndex)
{
if((p_layerIndex == 0) && (m_target != null)) // Only main Locomotion/Emotes layer
if((p_layerIndex == m_mainLayer) && (m_target != null)) // Only main Locomotion/Emotes layer
{
Transform l_camera = PlayerSetup.Instance.GetActiveCamera().transform;

Expand Down

0 comments on commit 5c7442d

Please sign in to comment.