I have some trouble to use physics simulation on a character. From what I understand, if I need to physic simulation on my main character, I need to deactivate the character movement component first.
I’m trying to do a grappling hook, where my character would be subject to impulse force and joint physic constraint.
In the exemple from the video, when the character is in the air, and the grappling hook hit something, I deactivate the character movement, activate the simulate physics on him, and add an impulse force toward the hit location.
When I release the hook, I re activate character movement and stop physics, but the velocity during the simulation is not added to the character, and he start the movement exactly where he stopped it when reeled the grappling hook.
Is this the best way to do a grappling hook ? and is there a way to fix those issues ?
Thank you a lot in advance
I finally figured it out.
I added the node “Stop Movement Immediately” when I’m hooked ( to stop the jump sequence ) before I activate the physics simulation, and when I release the hook, I added a “Launch Character” just after I re-activate the character movement component, with the velocity of the character when I was hooked.
Tell me if you think of something maybe easier
That looks pretty good! Sounds like you figured it out: the reason you needed to use “Launch Character” after the re-activation is to sync up the Component’s velocity to the physics velocity so the character component can continue with its own simulation where the physics left off.
I guess you figured out what you needed, just thought I’d share this tutorial on grappling.
I'm trying to achieve a grappling system for a 2d project, but with little success
To move the character to the hook what did you use? impulse, force, launch character? Can you tell me, please?