# Launch character to a target location

**URL:** <https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050>\
**Category:** Character & Animation\
**Tags:** projectile-movement, unreal-engine, question\
**Created:** [February 19, 2021, 12:44pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050 "2021-02-19T12:44:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ikthaleon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ikthaleon](https://forums.unrealengine.com/u/Ikthaleon)\
**Post date:** [February 19, 2021, 12:44pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/1 "2021-02-19T12:44:30Z")

</div>

Hello,

I’m attempting to launch my currently controlled character to a location the player has clicked on. I’d like the character to launch in an arc from their position and then land on the target location. (Think Thor leaping with his hammer and doing an AOE at the end of the leap)

I’ve tried a number of methods from adding impulse to predicting projectile paths. The closest I got to was using the array of vectors from PredictProjectilePath and then using SetActorLocation from those - this seems to work ok if you turn off Gravity. Unfortunately this leads to a very stuttery experience - as the actor is doing micro jumps from one location to the next - was hoping for something smoother.

I was hoping there was someone out there that has solved this, or something like it?  
TIA

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 19, 2021, 2:23pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/2 "2021-02-19T14:23:50Z")

</div>

I’ve got this after some frantic clicking:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/0/d90ebb60e0169719c24bcd7689778c9b43c96098.gif)](https://gyazo.com/7b312dd38e08f03dfc03205fe865dd8f)

Do tell if it looks OK, as in, worth exploring and I’ll clean in up and post in an hour or two.

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/f/0ff5a44cb4ed5406d6681b104a983449c65384f6.gif)](https://gyazo.com/d504ebd074832bea163848c028cfb282)

---

<div class="post-metadata">

**Author:** ![Ikthaleon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ikthaleon](https://forums.unrealengine.com/u/Ikthaleon)\
**Post date:** [February 19, 2021, 9:32pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/3 "2021-02-19T21:32:37Z")

</div>

Yes that looks very much like what I’d like to do! If you have some code / BP / explanations I would be very grateful

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 19, 2021, 11:03pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/4 "2021-02-19T23:03:11Z")

</div>

I’ve added a couple of bells & whistles, some much needed control, limiters to keep things in check and variables to parametrise it:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/d/7cd2352f3a674282c06c935baac0e7af12e73abb.gif)](https://gyazo.com/b9d49c7779bc499909bee261092ebd53)

The general idea:

- we generate a spline between us and the click location with the mid point elevated
- we use a timeline to project a point along the spline over the timeline duration
- we adjust player velocity so it chases that point closely

In short, it’s a glorified rubberband that works surprisingly well.

- LMB: set landing location
- Mouse Scroll: adjust the apex of the set jump
- 1: Execute jump

I’ve added comments where I believe it made sense. Do tell if anything else makes little sense. Not attaching screenshots due to time constraints. Here’s a project link, though:

> **[leap.zip](https://drive.google.com/file/d/1mPdzx0yHaXUx_apOBU5bWnKvD4C8PU83/view?usp=sharing)**
>
> Google Drive file.

All script is in the character blueprint, the yellow bit:

 ![330332-yellowbit.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/9/849b550fca9411dd6a7419b3105f3b412ab72a35.jpeg)

---

<div class="post-metadata">

**Author:** ![Ikthaleon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ikthaleon](https://forums.unrealengine.com/u/Ikthaleon)\
**Post date:** [February 20, 2021, 12:50am UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/5 "2021-02-20T00:50:23Z")

</div>

More complex than I expected, but a perfect implementation - thanks a million.

---

<div class="post-metadata">

**Author:** ![SpazzCo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SpazzCo](https://forums.unrealengine.com/u/SpazzCo)\
**Post date:** [October 31, 2022, 9:40pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/6 "2022-10-31T21:40:34Z")

</div>

can you upload a better quality image so i can read your nodes?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 31, 2022, 9:41pm UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/7 "2022-10-31T21:41:43Z")

</div>

The project is attached.

---

<div class="post-metadata">

**Author:** ![SpazzCo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SpazzCo](https://forums.unrealengine.com/u/SpazzCo)\
**Post date:** [November 8, 2022, 12:37am UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/8 "2022-11-08T00:37:00Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![Deveth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deveth](https://forums.unrealengine.com/u/Deveth)\
**Post date:** [July 11, 2023, 1:06am UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/9 "2023-07-11T01:06:04Z")

</div>

So I am trying to reverse engineer this system for a project, because I have something similar in mind but I’m stuck. My actor is not moving on the spline, and I’m almost certain the problem is that the spline is attached to the character (when I spawn another actor on the coordinates and tell him to move along my original actor spline it works perfectly. The problem is probably quite trivial but I don’t know how to solve it.

![Recording 2023-07-11 at 01.05.23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/1/5e1c90777ab15bd9575154ac76f0db2011433ebf.gif)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 11, 2023, 3:22am UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/10 "2023-07-11T03:22:42Z")

</div>

Looks like the spline comp is not set to be in absolute world space coords after spawning.

---

<div class="post-metadata">

**Author:** ![Deveth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deveth](https://forums.unrealengine.com/u/Deveth)\
**Post date:** [July 11, 2023, 7:06am UTC](https://forums.unrealengine.com/t/launch-character-to-a-target-location/479050/11 "2023-07-11T07:06:13Z")

</div>

Yes, that was the problem! Thanks
