- #1
aosome23
- 16
- 0
Sorry for the confusing tittle but I could not explain it better. Here is what I am trying to ask:
When you have 2 axis(x and y) such as the image below, the sum of the two angles, a and b will always be equal to 90 degrees.
a + b = 90degrees
However when you add a 3rd axis(x, y and z, making it 3D), the total sum seems to differ depending on the angles of each axis. I have tried it multiple times and the largest angles seems to be around 106 degrees. The sum of the angles starts to get bigger as the angles of each axis becomes closer to each other.
i tested this out in a game engine called unity so my programming might be wrong but I highly doubt that since it is only a couple lines of code. If anyone understands how to code in unity, here is the code:
float angleX = Vector3.Angle(transform.right, new Vector3(transform.right.x, 0.0f, transform.right.z));
float angleY = Vector3.Angle(transform.up, new Vector3(transform.up.x, 0.0f, transform.up.z));
float angleZ = Vector3.Angle(transform.forward, new Vector3(transform.forward.x, 0.0f, transform.forward.z));
When the 3 angles are added up together it ranges from 90 degrees to about 106 degrees as I mentioned above. So, why does this happen? Is this supposed to happen? Or am I doing something wrong?
When you have 2 axis(x and y) such as the image below, the sum of the two angles, a and b will always be equal to 90 degrees.
a + b = 90degrees
However when you add a 3rd axis(x, y and z, making it 3D), the total sum seems to differ depending on the angles of each axis. I have tried it multiple times and the largest angles seems to be around 106 degrees. The sum of the angles starts to get bigger as the angles of each axis becomes closer to each other.
i tested this out in a game engine called unity so my programming might be wrong but I highly doubt that since it is only a couple lines of code. If anyone understands how to code in unity, here is the code:
float angleX = Vector3.Angle(transform.right, new Vector3(transform.right.x, 0.0f, transform.right.z));
float angleY = Vector3.Angle(transform.up, new Vector3(transform.up.x, 0.0f, transform.up.z));
float angleZ = Vector3.Angle(transform.forward, new Vector3(transform.forward.x, 0.0f, transform.forward.z));
When the 3 angles are added up together it ranges from 90 degrees to about 106 degrees as I mentioned above. So, why does this happen? Is this supposed to happen? Or am I doing something wrong?
Last edited: