# How to check if the character is moving up?

**URL:** <https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890>\
**Category:** Character & Animation\
**Tags:** unreal-engine, UE4, question, Blueprint\
**Created:** [May 24, 2018, 11:18pm UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890 "2018-05-24T23:18:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MysticShadowEG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MysticShadowEG](https://forums.unrealengine.com/u/MysticShadowEG)\
**Post date:** [May 24, 2018, 11:18pm UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890/1 "2018-05-24T23:18:47Z")

</div>

I am wondering if there is a way to check if the player is moving up. For example; a player is running up a ramp, can I print “Moving Up”, or if they are moving down, print “Moving Down”. Another Example; Stopping a player from sprinting when they are moving up, but not when they are moving down.

The only way I thought this could happen is to get the transform of the character and check if the ‘z’ value is increasing or decreasing. Not sure if this is possible though.

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [May 25, 2018, 1:04am UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890/2 "2018-05-25T01:04:50Z")

</div>

how about getting the characters velocity? that will tell you if the character is moving up or down if you separate out the z axis

 ![242112-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/0/e801b13b06f1d45fc08bd727b16d906e5eddbbe1.png)

---

<div class="post-metadata">

**Author:** ![MysticShadowEG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MysticShadowEG](https://forums.unrealengine.com/u/MysticShadowEG)\
**Post date:** [May 25, 2018, 1:28am UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890/3 "2018-05-25T01:28:45Z")

</div>

Thanks, but wouldn’t the velocity on the z axis only increase or decrease when in the air?

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [May 25, 2018, 1:58am UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890/4 "2018-05-25T01:58:07Z")

</div>

o yea i guess your right. i forgot that movement up slopes is just considered sliding in the xy plane and not actual z acceleration.

---

<div class="post-metadata">

**Author:** ![MysticShadowEG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MysticShadowEG](https://forums.unrealengine.com/u/MysticShadowEG)\
**Post date:** [May 25, 2018, 6:37am UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890/5 "2018-05-25T06:37:41Z")

</div>

![242123-ue4-bluepintexample.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/0/d10669363c44b388647c328b81231d534fe885ef.png)

After playing around a bit I found that this worked, annotated it in case anyone was wondering how to do it.

---

<div class="post-metadata">

**Author:** ![MysticShadowEG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MysticShadowEG](https://forums.unrealengine.com/u/MysticShadowEG)\
**Post date:** [May 25, 2018, 6:49am UTC](https://forums.unrealengine.com/t/how-to-check-if-the-character-is-moving-up/425890/6 "2018-05-25T06:49:26Z")

</div>

Should have mentioned that first; the velocity value I had already found and stored as a variable, and second; all of that blueprinting is just connected to an Event Tick.
