Hello. I have looked at the docs for Vector3.distance, but I still cannot figure out how to do this. I want to measure the distance (of the x axis only) between objects A and B, where A acts as the origin, and then store that number as a variable.
For example: if object A was at (2,4,6) and object B was at (10,5,0), the variable’s value would be 8. But, if object A was at (1,2,3) and object B was at (0,0,0) the variable’s value would be -1.
Thanks