Joints not destroying
Posted: Mon Feb 13, 2023 12:21 pm
Hello everyone!
I am currently in the process of developing a game prototype, and right now I am making a grappling hook by using a distance joint (that connects the player and a grapple point). My plan is when the player holds a button, the grappling hook will be connected. And when the button is released, the hook will be disconnected and thus the joint will be destroyed.
But right now, when I hold the button, the joint is created. However, when I release, the joint is not destroyed, even when I call joint:destroy()! The player still behaves as if the joint is connected
I honestly have no clue what might be causing this, I don't think that I am attempting to use the joint later on, so it should technically be destroyed, right?
I have included a .love file, please ignore the messy code I would be very grateful for all help I get
------------------------------------------------------------------------------------------
Instructions for .love file:
Move to the left to find a box with a circle around it, the cube is the grapple point and the circle is the zone you can grapple in.
WASD - Move
K - Hold to grapple
I am currently in the process of developing a game prototype, and right now I am making a grappling hook by using a distance joint (that connects the player and a grapple point). My plan is when the player holds a button, the grappling hook will be connected. And when the button is released, the hook will be disconnected and thus the joint will be destroyed.
But right now, when I hold the button, the joint is created. However, when I release, the joint is not destroyed, even when I call joint:destroy()! The player still behaves as if the joint is connected
I honestly have no clue what might be causing this, I don't think that I am attempting to use the joint later on, so it should technically be destroyed, right?
I have included a .love file, please ignore the messy code I would be very grateful for all help I get
------------------------------------------------------------------------------------------
Instructions for .love file:
Move to the left to find a box with a circle around it, the cube is the grapple point and the circle is the zone you can grapple in.
WASD - Move
K - Hold to grapple