# How to return and use the normal direction of a polygon?

**URL:** <https://forums.unrealengine.com/t/how-to-return-and-use-the-normal-direction-of-a-polygon/479546>\
**Category:** World Creation\
**Tags:** gravity, unreal-engine, Physics, Blueprint, question, deformation\
**Created:** [February 28, 2021, 10:25am UTC](https://forums.unrealengine.com/t/how-to-return-and-use-the-normal-direction-of-a-polygon/479546 "2021-02-28T10:25:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJChalupnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JJChalupnik](https://forums.unrealengine.com/u/JJChalupnik)\
**Post date:** [February 28, 2021, 10:25am UTC](https://forums.unrealengine.com/t/how-to-return-and-use-the-normal-direction-of-a-polygon/479546/1 "2021-02-28T10:25:23Z")

</div>

Hi,

The ultimate goal of this idea would be to calculate the orientation of Gravity on the whole scene, on every tick, checking to see if the direction has changed, and using the polygon normal of a ground object (that can deform) as the guide to re-orienting the gravity direction.

I’d like a character to run around on a giant animated charactor, with deforming geo. This will obviously affect navmeshes as well, but I gotta start somewhere, and most references I can find, point to gravity volumes or fixed directions… Any help would be greatly appreciated. I’m not sure what to look for in Blueprints to execute this.

---

<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 28, 2021, 1:54pm UTC](https://forums.unrealengine.com/t/how-to-return-and-use-the-normal-direction-of-a-polygon/479546/2 "2021-02-28T13:54:35Z")

</div>

> using the polygon normal of a ground  
> object (that can deform) as the guide  
> to re-orienting the gravity direction

You can get a _Normal_ from a _Trace_:

 ![331145-screenshot-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/5/3356d77069d307f542e1a0c48258951381852594.jpeg)

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/8/1185731b451319cb6f61cbe748e7bb3b05de2ba6.gif)](https://gyazo.com/e68fc5145a48e5705aeb10b0a409552c)

So a character could trace along the negative _Up Vector_ to check the surface’s direction:

 ![331147-screenshot-4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/b/dab779e90d8d6b7fa5415118fdf475d08ff55779.jpeg)

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/9/1a9799f1efbb8d88426f74af04783e9b1bd9b6a5.gif)](https://gyazo.com/35c11bd3fb609d0ff7a885384aff71dd)

* * *

When it comes to translating this into actual character gravity, I’m not so sure - never attempted it seriously enough but there are plugins on Marketplace that do just that.

---

<div class="post-metadata">

**Author:** ![JJChalupnik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JJChalupnik](https://forums.unrealengine.com/u/JJChalupnik)\
**Post date:** [March 1, 2021, 7:13am UTC](https://forums.unrealengine.com/t/how-to-return-and-use-the-normal-direction-of-a-polygon/479546/3 "2021-03-01T07:13:43Z")

</div>

Thank you so much for your reply! This is a lot to chew on. I will give this a try and look into these functions. Many many thanks!
