# How to make a character stop walking when hitting a wall

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-character-stop-walking-when-hitting-a-wall/2293715>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [January 20, 2025, 5:26pm UTC](https://forums.unrealengine.com/t/how-to-make-a-character-stop-walking-when-hitting-a-wall/2293715 "2025-01-20T17:26:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [January 20, 2025, 6:29pm UTC](https://forums.unrealengine.com/t/how-to-make-a-character-stop-walking-when-hitting-a-wall/2293715/2 "2025-01-20T18:29:13Z")

</div>

Get a `Line Trace by Channel` node and place it right after the `Triggered` pin of your IA. Then get the player character’s location with the `Get Actor Location` node and plug it into the `Start` pin of the line trace node. Then get the `Get Actor Forward Vector` node, multiply it with something like 200 using the multiplication node and add the actor’s location to it using the addition node, then plug the result into the `End` pin of the line trace node. Connect the `Return Value` of the line trace to the `Condition` pin of a `Branch` node and trigger your `Add Movement Input` nodes after it’s `False` pin.

Hope this helps! 😇

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-make-a-character-stop-walking-when-hitting-a-wall/2293715)._
