Browse Source

Removed physics on oar

main
Joshua 1 year ago
parent
commit
5ed9edabc9
3 changed files with 10 additions and 8 deletions
  1. BIN
      Assets/Scenes/Development/CharacterControllerTest.unity
  2. +3
    -1
      Assets/Scripts/Player/HandController.cs
  3. +6
    -6
      Assets/Scripts/Player/OarController.cs

BIN
Assets/Scenes/Development/CharacterControllerTest.unity (Stored with Git LFS) View File

size 19170

+ 3
- 1
Assets/Scripts/Player/HandController.cs View File

@ -129,6 +129,8 @@ public class HandController : MonoBehaviour
}
}
if (m_oar.isColliding())
UndoLastMovement();
}
@ -136,7 +138,7 @@ public class HandController : MonoBehaviour
{
Vector3 direction = m_lastPosition - transform.localPosition;
transform.localPosition += direction;
transform.localPosition = m_lastPosition;
}

+ 6
- 6
Assets/Scripts/Player/OarController.cs View File

@ -96,10 +96,10 @@ public class OarController : MonoBehaviour
Quaternion rotation = Quaternion.LookRotation(forward, direction);
MoveOarToPosition(m_rightHand.transform.position - direction * m_distanceFromRightHand);
//m_oarRigidbody.MoveRotation(rotation);
//m_oarRigidbody.MovePosition(m_rightHand.transform.position - direction * m_distanceFromRightHand);
MoveOarToRotation(rotation);
//MoveOarToPosition(m_rightHand.transform.position - direction * m_distanceFromRightHand);
m_oarRigidbody.MoveRotation(rotation);
m_oarRigidbody.MovePosition(m_rightHand.transform.position - direction * m_distanceFromRightHand);
//MoveOarToRotation(rotation);
}
@ -134,7 +134,7 @@ public class OarController : MonoBehaviour
}
/*
void OnCollisionEnter(Collision collision)
{
@ -152,7 +152,7 @@ public class OarController : MonoBehaviour
}
}*/
#endregion Class Functionality

Loading…
Cancel
Save