# Launch player at the same velocity but in a different direction (Super Mario GroundPound Leap)

**URL:** <https://forums.unrealengine.com/t/launch-player-at-the-same-velocity-but-in-a-different-direction-super-mario-groundpound-leap/490913>\
**Category:** World Creation\
**Tags:** forward-vector, unreal-engine, Physics, velocity, question\
**Created:** [November 14, 2021, 6:28pm UTC](https://forums.unrealengine.com/t/launch-player-at-the-same-velocity-but-in-a-different-direction-super-mario-groundpound-leap/490913 "2021-11-14T18:28:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cat419](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cat419](https://forums.unrealengine.com/u/Cat419)\
**Post date:** [November 14, 2021, 6:28pm UTC](https://forums.unrealengine.com/t/launch-player-at-the-same-velocity-but-in-a-different-direction-super-mario-groundpound-leap/490913/1 "2021-11-14T18:28:31Z")

</div>

I’m trying to give the player the ability to **launch themselves at the same velocity** with some extra height.  
This works relatively well, however it **does not account for the player changing the direction they are facing** right before launching. This means that the player can be **launched backwards if they spin around** quick enough which is not desirable.

_ **How do I make it so that they are always launched forward but still maintain their previous velocity?** _

_ **P.S. The desired result is very similar to the GroundPound leap in the 3d Super Mario games** _

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 15, 2021, 9:32pm UTC](https://forums.unrealengine.com/t/launch-player-at-the-same-velocity-but-in-a-different-direction-super-mario-groundpound-leap/490913/2 "2021-11-15T21:32:57Z")

</div>

You are providing too little information of what you are trying to achieve. Is there a blueprint snapshot we can view? A code snippet?

---

<div class="post-metadata">

**Author:** ![Cat419](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cat419](https://forums.unrealengine.com/u/Cat419)\
**Post date:** [November 16, 2021, 11:56am UTC](https://forums.unrealengine.com/t/launch-player-at-the-same-velocity-but-in-a-different-direction-super-mario-groundpound-leap/490913/3 "2021-11-16T11:56:52Z")

</div>

Hey, thanks for your reply,

I realised what I’m trying to do is literally just the groundpound jump from the Super Mario games.  
I have a blueprint here that shows when the player does a groundpound:

 ![352238-screenshot-2021-11-16-114608.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/f/59f15bc69f0b0666304a70e44c659aeac18b1c62.png)

This blueprint Just checks if the player is falling at a certain height (Length of raycast) then stores their current velocity into a variable (Before GP Velocity) The launches the player towards the ground at a velocity of -2000.  
Currently, this works as intended with the player stopping completely before going straight down towards the ground.

The next blueprint is for the jump which happens afterwards:

 ![352239-screenshot-2021-11-16-115105.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/2/0e2592d13b05f601fe49c8cb5573e4d4c5b07c58.png)

This script checks if the player is able to groundpound and, if they are, launches them into the air at a velocity of 1200 while using the same X & Y velocity as before the groundpound. This works well, however, they are always launched in the same direction they were heading before whereas I want them to always be launched wherever they are facing.  
I also cannot just launch the player along their forward vector at a set velocity as it means they won’t be launched at the same speed as before the groundpound.

I hope that wasn’t too confusing, like I said, the problem appears to be with the launch character blueprint. I was wondering if there is a way to rotate the vector if that makes sense.

Thank you for your time 🙂

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 17, 2021, 7:28pm UTC](https://forums.unrealengine.com/t/launch-player-at-the-same-velocity-but-in-a-different-direction-super-mario-groundpound-leap/490913/4 "2021-11-17T19:28:17Z")

</div>

ok, so in which dimensions is the jump happening? when you say ‘wherever they are facing’ what do you mean? Where does the character face? Up/down, left/right? both?  
That’s what I meant earlier, still a bit too little information.  
But it’s ok, I think I get it. Why can you not use the forward vector? It is a unity vector and determines direction a character is facing. That’s exactly what you need. Multiply it by the new velocity vector you are trying to apply just before for the launch.
