Hey so im wondering how to call on joint break on the connected body when a joint breaks.
also if i have 2 joints calling it on the correct connected body of the joint that broke
Thanks ~Scott
Hey so im wondering how to call on joint break on the connected body when a joint breaks.
also if i have 2 joints calling it on the correct connected body of the joint that broke
Thanks ~Scott
First part(if C# and only one joint on GameObject):
void OnJointBreak ()
{
Joint brokenJoint = gameObject.GetComponent<Joint>();
ScriptName cScript = brokenJoint.connectedBody.gameObject.GetComponent<ScriptName>();
cScript.connectedBodyFunctionName();
}