Minor change of grab state detection

This commit is contained in:
SDraw 2024-08-11 17:36:10 +03:00
parent dee25a1c48
commit e5d4ea9d29
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
4 changed files with 19 additions and 4 deletions

View file

@ -30,7 +30,7 @@ namespace ml_prm
void Update()
{
bool l_state = Mathf.Approximately(m_puppetMaster.PlayerAvatarMovementDataInput.AnimatorGestureLeft, 1f);
bool l_state = m_puppetMaster.IsLeftGrabPointerActive();
if(m_stateLeft != l_state)
{
m_stateLeft = l_state;
@ -38,7 +38,7 @@ namespace ml_prm
OnGestureState.Invoke(m_puppetMaster, true, m_stateLeft);
}
l_state = Mathf.Approximately(m_puppetMaster.PlayerAvatarMovementDataInput.AnimatorGestureRight, 1f);
l_state = m_puppetMaster.IsRightGrabPointerActive();
if(m_stateRight != l_state)
{
m_stateRight = l_state;