public static DrawDistanceGizmo ( Vector3 anchor, Vector3 connectedAnchor, float distance ) : void | ||
anchor | Vector3 | |
connectedAnchor | Vector3 | |
distance | float | |
return | void |
public void OnSceneGUI() { DistanceJoint2D target = (DistanceJoint2D)base.target; if (target.enabled) { Vector3 anchor = Joint2DEditor.TransformPoint(target.transform, (Vector3)target.anchor); Vector3 connectedAnchor = (Vector3)target.connectedAnchor; if (target.connectedBody != null) { connectedAnchor = Joint2DEditor.TransformPoint(target.connectedBody.transform, connectedAnchor); } Joint2DEditor.DrawDistanceGizmo(anchor, connectedAnchor, target.distance); base.OnSceneGUI(); } }
public new void OnSceneGUI() { SpringJoint2D springJoint2D = (SpringJoint2D)base.target; if (springJoint2D.enabled) { Vector3 anchor = Joint2DEditor.TransformPoint(springJoint2D.transform, springJoint2D.anchor); Vector3 vector = springJoint2D.connectedAnchor; if (springJoint2D.connectedBody) { vector = Joint2DEditor.TransformPoint(springJoint2D.connectedBody.transform, vector); } Joint2DEditor.DrawDistanceGizmo(anchor, vector, springJoint2D.distance); base.OnSceneGUI(); } }
public new void OnSceneGUI() { DistanceJoint2D distanceJoint2D = (DistanceJoint2D)this.target; if (!distanceJoint2D.enabled) { return; } Vector3 anchor = Joint2DEditor.TransformPoint(distanceJoint2D.transform, distanceJoint2D.anchor); Vector3 vector = distanceJoint2D.connectedAnchor; if (distanceJoint2D.connectedBody) { vector = Joint2DEditor.TransformPoint(distanceJoint2D.connectedBody.transform, vector); } Joint2DEditor.DrawDistanceGizmo(anchor, vector, distanceJoint2D.distance); base.OnSceneGUI(); }
public new void OnSceneGUI() { SpringJoint2D target = (SpringJoint2D)this.target; if (!target.enabled) { return; } Vector3 anchor = Joint2DEditor.TransformPoint(target.transform, (Vector3)target.anchor); Vector3 vector3 = (Vector3)target.connectedAnchor; if ((bool)((Object)target.connectedBody)) { vector3 = Joint2DEditor.TransformPoint(target.connectedBody.transform, vector3); } Joint2DEditor.DrawDistanceGizmo(anchor, vector3, target.distance); base.OnSceneGUI(); }