|
|
|
|
|
|
Quaternion deltaRotation = Quaternion.Euler(zAxis * rotateZ); |
|
|
|
m_AgentRb.MoveRotation(m_AgentRb.rotation * deltaRotation); |
|
|
|
|
|
|
|
if (invertX && transform.position.x - transform.parent.transform.position.x < -m_InvertMult * 5f || |
|
|
|
!invertX && transform.position.x - transform.parent.transform.position.x > -m_InvertMult * 5f) |
|
|
|
if (invertX && transform.position.x - transform.parent.transform.position.x < -m_InvertMult * 3f || |
|
|
|
!invertX && transform.position.x - transform.parent.transform.position.x > -m_InvertMult * 3f) |
|
|
|
transform.position = new Vector3(-m_InvertMult * 5f + transform.parent.transform.position.x, |
|
|
|
transform.position = new Vector3(-m_InvertMult * 3f + transform.parent.transform.position.x, |
|
|
|
transform.position.y, |
|
|
|
transform.position.z); |
|
|
|
} |
|
|
|