Draw a Joint2D and breaking limit

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ruimgoncalves
:warning: Old Version Published before Godot 3 was released.

How can I get access to the computed points of a Joint2D object, so I can use them to _draw a rope between the 2 bound sprites?

Or is there any other, simpler way to do this?

The other question is how can I get the applied tensor strength so I can calculate the breaking point of a spring. It wold be great if the Joint class had a notification if the force applied to it exceeded the tensor limit.

:bust_in_silhouette: Reply From: jospic

I’m not sure and I’ve not tried, but I think:

var j = get_node("path your joint")  # argument is your joint node      
var nodeA = j.get_node_a()
var nodeB = j.get_node_b()
var posNodeA = get_node(nodeA).get_pos()
var posNodeB = get_node(nodeB).get_pos()