- Home /
Question by
SunnyPalmSprings · May 01, 2019 at 07:52 AM ·
vector3distancemeshfiltervector3.distance
Get x and y Distance between two Vectors
I'm trying to stretch a Mesh Filter vertice from my object to where a mouse ray hits. So I need the x and y coordinates in local space. How would I get them?
Vector3.Distance only gives me one number.
Comment
Best Answer
Answer by Hellium · May 01, 2019 at 08:04 AM
Vector3 distance = new Vector3(
Math.Abs( hit.point.x - otherPoint.x ),
Math.Abs( hit.point.y - otherPoint.y ),
Math.Abs( hit.point.z - otherPoint.z )
);
I really overthought this, huh. I realized it as soon as I asked.
Thank you!