Question by
FoneFreak · Jan 10, 2017 at 06:23 PM ·
eulerangles2d rotationupside-down
[HELP] Check if gameobject is upside down
Hi friends, i have the code below which works if the object land upright (point scored etc)
How can i convert the code to also work if the object lands upside down?
Thanks in advance
if(m_rig.transform.eulerAngles.z <= 30)
{
m_rig.velocity = Vector2.zero;
Add1Point();
StartCoroutine(ResetPosition());
}
else if(m_rig.transform.eulerAngles.z >= 330)
{
m_rig.velocity = Vector2.zero;
Add1Point();
StartCoroutine(ResetPosition());
}
Comment