# Character trajectory prediction

**URL:** <https://forums.unrealengine.com/t/character-trajectory-prediction/462361>\
**Category:** AI\
**Tags:** character-state, unreal-engine, question\
**Created:** [March 11, 2020, 5:54pm UTC](https://forums.unrealengine.com/t/character-trajectory-prediction/462361 "2020-03-11T17:54:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darmane](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/darmane/32/693182_2.png) [@darmane](https://forums.unrealengine.com/u/darmane)\
**Post date:** [March 11, 2020, 5:54pm UTC](https://forums.unrealengine.com/t/character-trajectory-prediction/462361/1 "2020-03-11T17:54:54Z")

</div>

Hi everyone! It’s my first post here.

I want to predict the trajectory of my character so that I can get some data about the height of the terrain (or objects) in front of him like this photo from the paper that I’m reading explains (look at the black marks).

 ![297715-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/a/2ea227a8383ee860d76edcb6986142cccfaf433c.png)

I was trying to make it creating a Point object that has a capsule component and projecting it in front of my character considering his velocity and rotation but I’m stuck…  
Also this points have to step over object up to a certain height as you can see here.

 ![297716-capture2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/1/651dfcbc7a904718e4561db465a0b6e24932d037.png)

Any idea? What would you do?  
Thx a lot.

---

<div class="post-metadata">

**Author:** ![Grot13](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/grot13/32/1008648_2.png) [@Grot13](https://forums.unrealengine.com/u/Grot13)\
**Post date:** [March 11, 2020, 10:56pm UTC](https://forums.unrealengine.com/t/character-trajectory-prediction/462361/2 "2020-03-11T22:56:52Z")

</div>

Hi,  
Have you tried nodes like “predict projectile path” ?  
It fires a trace depending on the character velocity, and other physics parameters, like capsule weight. It is a sphere trace, you can input the radius of the capsule.

 ![297741-image-5.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/2/6d204d4a7a26e295bd91fa9e190362d8f98d9ccf.jpeg)

There are 2 other versions of the node, one that traces for object, and the advanced one, honestly I don’t know the difference :

 ![297742-image-4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/7/cc77aaf76932c1342e15b01d04be911a62db2080.jpeg)

---

<div class="post-metadata">

**Author:** ![darmane](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/darmane/32/693182_2.png) [@darmane](https://forums.unrealengine.com/u/darmane)\
**Post date:** [March 16, 2020, 3:17pm UTC](https://forums.unrealengine.com/t/character-trajectory-prediction/462361/3 "2020-03-16T15:17:59Z")

</div>

First of all, thanks for your answer. Finally I have calculated my trajectory with some points in front of the character and trace a top down to take the height.

Every point have a position in the world and the time in seconds that it was created. So for the tail I have stored my position (points) every frame for one second in a queue, then every frame the oldest point leaves the queue and enter the one at my position.

Here comes a gif with the result. thx!

![297944-doc-2020-03-16-16-08-59.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/c/f1c23c60df697b6476ebfac9db76916afc70418b.gif)

---

<div class="post-metadata">

**Author:** ![McCarranPort](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@McCarranPort](https://forums.unrealengine.com/u/McCarranPort)\
**Post date:** [April 12, 2021, 6:55am UTC](https://forums.unrealengine.com/t/character-trajectory-prediction/462361/4 "2021-04-12T06:55:14Z")

</div>

Hello!  
If you made with blueprints, can you provide a screenshot about it.  
Thanks in advance!
