Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- escapeAngle += 90;
- var radians = escapeAngle * (Mathf.PI / 180);
- var escapeAngleAsDirectionVector = new Vector2 ();
- escapeAngleAsDirectionVector.x = Mathf.Cos (radians);
- escapeAngleAsDirectionVector.y = Mathf.Sin (radians);
- escapeAngleAsDirectionVector = transform.TransformPoint (escapeAngleAsDirectionVector);
- Quaternion.Euler(x, y, z) * Vector3.forward;
- if(esacapeAngle < 0)
- escapeAngle += 360;
- if(escapeAngle >= 360)
- throw error
Add Comment
Please, Sign In to add comment