|
|
@ -96,11 +96,11 @@ public class OarController : MonoBehaviour |
|
|
|
Quaternion rotation = Quaternion.LookRotation(forward, direction); |
|
|
|
|
|
|
|
|
|
|
|
//transform.rotation = rotation;
|
|
|
|
//transform.position = m_rightHand.transform.position - direction * m_distanceFromRightHand;
|
|
|
|
transform.rotation = rotation; |
|
|
|
transform.position = m_rightHand.transform.position - direction * m_distanceFromRightHand; |
|
|
|
//MoveOarToPosition(m_rightHand.transform.position - direction * m_distanceFromRightHand);
|
|
|
|
m_oarRigidbody.MoveRotation(rotation); |
|
|
|
m_oarRigidbody.MovePosition(m_rightHand.transform.position - direction * m_distanceFromRightHand); |
|
|
|
//m_oarRigidbody.MoveRotation(rotation);
|
|
|
|
//m_oarRigidbody.MovePosition(m_rightHand.transform.position - direction * m_distanceFromRightHand);
|
|
|
|
//MoveOarToRotation(rotation);
|
|
|
|
|
|
|
|
|
|
|
@ -128,12 +128,12 @@ public class OarController : MonoBehaviour |
|
|
|
Collider[] col = Physics.OverlapBox(transform.position + m_boxCollider.center, m_boxCollider.size / 2, rotation); |
|
|
|
if (col.Intersect(m_forbiddenColliders).Any()) |
|
|
|
{ |
|
|
|
Debug.Log($"Forbidden collision: {string.Join(", ", col.Intersect(m_forbiddenColliders))}"); |
|
|
|
//Debug.Log($"Forbidden collision: {string.Join(", ", col.Intersect(m_forbiddenColliders))}");
|
|
|
|
return true; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Debug.Log($"Ignored collision: {string.Join(", ", col.Except(m_forbiddenColliders))}"); |
|
|
|
// Debug.Log($"Ignored collision: {string.Join(", ", col.Except(m_forbiddenColliders))}");
|
|
|
|
} |
|
|
|
return false; |
|
|
|
|
|
|
|