How to disable the physical reaction of a distance joint 2D?

The most economical way I found so far to measure when a certain distance between bodies has been crossed so far is to use a distance joint with maxDistanceOnly == true and breakForce == 0. The only problem is that the reaction of the joint gets applied to the connected body even if the break force is 0, thus changing its velocity.

Is it possible to disable the reaction entirely?

Hello, any chance are you looking for calculating distance between two GameObject ? If so, you can do Vector math to find easily. Example math for A to B would be:

  GameObject A;
  GameObject B;
 ( (B.transform.position - A.transform.position).magnitude <= distance ) // true if distance between bodies has been crossed