Hi i have trouble destroying my fixed joint.
I have a child with an fixed joint on it and the joint attaches to an cube. Like a crane hook/magnet.
i made this so far. I runs but nothing happens … I tried lots of different ways to make this work. I can get the whole magnet do be destroyed but thats not what i want.
if(Input.GetKeyDown(KeyCode.E)){
var DropCargo = GameObject.Find("Magnet"); // finds my object named Magnet
//DropCargo.GetComponent(FixedJoint); // not in use //gives the magnet a fixedjoint
DestroyObject(DropCargo.FixedJoint); // Destroy the joint
print("Attemts to release cargo"); // just so i know if i have connection with the function
}