hard20 pts · first answer countsvector-mathdebugging
Angle between vectors is NaN
What does angle hold after this code runs?
Vector3 a = new Vector3(2f, 0f, 0f); Vector3 b = new Vector3(1f, 0f, 0f); float angle = Mathf.Acos(Vector3.Dot(a, b)) * Mathf.Rad2Deg;
Discussion 0
Join free to post in the discussion.
Related questions
- Is the enemy in front of the playerGame Developer
- Faster diagonal movementGame Developer
- Length of a 2D vectorGame Developer
- What a surface normal isGame Developer
- Health ratio is always zeroGame Developer
- Seeing why AI behaves oddlyGame Developer
- Normalising a zero vectorGame Developer
- Finding why a mesh is invisibleGame Developer