Hi
Can you point me in the right direction?
I have a object with a SpringJoint component which is attached to another object.
How can I get the distance between the first object and the spring’s anchor point on the second?
Thanks
Hi
Can you point me in the right direction?
I have a object with a SpringJoint component which is attached to another object.
How can I get the distance between the first object and the spring’s anchor point on the second?
Thanks
TransformPoint is what I needed.
var target = Spring.connectedBody.transform.TransformPoint(Spring.connectedAnchor);
var distance = Vector3.Distance(transform.position, target);