mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Main layer search
This commit is contained in:
parent
e633fc6488
commit
5c7442d60c
1 changed files with 4 additions and 1 deletions
|
@ -10,17 +10,20 @@ namespace ml_pam
|
||||||
static readonly Quaternion ms_rotationOffset = Quaternion.Euler(0f, 0f, -90f);
|
static readonly Quaternion ms_rotationOffset = Quaternion.Euler(0f, 0f, -90f);
|
||||||
|
|
||||||
Animator m_animator = null;
|
Animator m_animator = null;
|
||||||
|
|
||||||
|
int m_mainLayer = -1;
|
||||||
CVRPickupObject m_target = null;
|
CVRPickupObject m_target = null;
|
||||||
Matrix4x4 m_offset = Matrix4x4.identity;
|
Matrix4x4 m_offset = Matrix4x4.identity;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
m_animator = PlayerSetup.Instance._animator;
|
m_animator = PlayerSetup.Instance._animator;
|
||||||
|
m_mainLayer = m_animator.GetLayerIndex("Locomotion/Emotes");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnAnimatorIK(int p_layerIndex)
|
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;
|
Transform l_camera = PlayerSetup.Instance.GetActiveCamera().transform;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue