how to launch a character in the direction its looking? (left OR right)

i want to launch a character in the direction its looking (only left and right) when the player presses the jump button
this is what ive got rn:




also the jump key:
image

Hey there @Mr.B0ombastic! Basically what you’re likely going to want to do is disable the regular jumping while you’re on the rope swing with a boolean and branch before you jump event fires. However for the launching, this tutorial will help you use the launch character node to send the character with however much force you want in a direction.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Let me know if you have any questions!

Oh yes the classic rope swing. I’m thinking of that first stage of Jungle Hunt in the Atari 2600 days.

You can use the following code to instantly turn left and right and know what direction you are facing. You will need to make 2 variables (booleans) “FacingRight?” and “FacingLeft?” and set them accordingly.

And then I set the L key to launch the character, I get the facing left and facing right variables hooked each to a branch and then adjust the values in the launch character until it felt right.

If your controls are backwards you may have to change where I have marked either a 1.0 or -1.0.

I don’t know off right off hand how to make a swinging rope or chain and have the player adhere to it. But just guessing I would put box or sphere collisions on the players hands, and out from the rope, vine, or chain, I would have very wide box collisions to easily overlap the players hands. And the very moment the player overlaps, THAT is where the player is locked to now and is stuck to it like velcro. So in your case you would obviously need another variable, “IsOnRope?”. And then use an AND boolean, and check for are they looking in the right directon? Are they on the rope? (and you could even have more bools and checks for if the player is holding either left or right).

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.