I have been getting strange results from a raycast operation and decided to use Debug.DrawRay to visualize the ray.
What I noticed is that my transform.position doesn’t line up with my object’s pivot.
I attached a script to my object and had the following code:
Debug.DrawRay(transform.position, -Vector3.up);
and
Debug.DrawLine(transform.position, Vector3.zero);
And this is what I got:
I thought that an object’s transform.position is the same as the pivot. Why are the two not lining up?