- Home /
Question by
jonik3221 · Jan 09, 2021 at 07:43 PM ·
dragfixedjoint
How to get rid of FixedJoint2D on drag
I want to make a drag and shoot game where if my RigidBody2D collides with a Collision2D the rigidbody2d sticks onto it with a fixedjont2d. I made the part where rigidbody2d sticks onto the collision2d on contact but I want to get rid of the fixedjoint2d when I drag and shoot my ball so the ball can move again. This is my code so far
screen-shot-2021-01-09-at-22437-pm.png
(20.9 kB)
Comment
Answer by logicandchaos · Jan 10, 2021 at 12:59 PM
Destroy(joint.gameObject); or you could disable and reenable as needed to save memory.
Your answer
![](https://koobas.hobune.stream/wayback/20220613023010im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Editor drag&drop override 1 Answer
Algorithm for Finding Shapes on a Grid 1 Answer
dragShot script mod 0 Answers
Drag rotation problem 0 Answers
Event.DragExited returns wrong Event.mousePosition 0 Answers