#Transform.right unexpected result
1 messages · Page 1 of 1 (latest)
This is the game window, I am hovering over the smaller subPart
The code that tells me the side I have selected:
float fwdBack = Vector3.Dot(target.transform.root.forward, hit.normal); // Z
float rightLeft = Vector3.Dot(target.transform.root.right, hit.normal); // X
float upDown = Vector3.Dot(target.transform.root.up, hit.normal); // Y
This works perfectly for the bigger part, but the smaller one has an issue where transform.right returns a value -1.192093E-07
Not sure what to make of this or how to find a solution
A dot product of zero tells you that the vectors are orthogonal
(that number is essentially zero)
Yeah, but what if the Dot product returns -2.2853E-10
Ahh, so I should treat that as a 0 then
You understand this number is just a really tiny decimal yes?
0.0000000002285...
Ahh, no i did not 😅
Scientific notation