Hi. I’m using a configurable joint to implement a tow hook. However, no matter how much the setting is changed, it is difficult to find a suitable joint. Does anyone have an opinion?
I did it with custom script without any joins.
code
public Transform hookedTo;
Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate()
{
Vector3 dir = (hookedTo.transform.position - transform.position).normalized;
Vector3 force = dir * Vector3.Distance(hookedTo.transform.position, transform.position) * rb.mass * 100;
rb.AddForce(force * Time.fixedDeltaTime);
}