# Aligning character to sphere

**URL:** <https://forums.unrealengine.com/t/aligning-character-to-sphere/406522>\
**Category:** Character & Animation\
**Tags:** raycasting, unreal-engine, UE4, CPP, question\
**Created:** [October 9, 2017, 12:38am UTC](https://forums.unrealengine.com/t/aligning-character-to-sphere/406522 "2017-10-09T00:38:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nasanooel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nasanooel](https://forums.unrealengine.com/u/Nasanooel)\
**Post date:** [October 9, 2017, 12:38am UTC](https://forums.unrealengine.com/t/aligning-character-to-sphere/406522/1 "2017-10-09T00:38:43Z")

</div>

Hi, I’m new to this engine though I am familiar with C++ and I’m having trouble doing what I thought would be quite simple when I saw UE had functions for it.

I followed the tutorials to make my own moving character and now that he is moving I’m trying to make it so as he walks along a 3D sphere he tilts along it. E.g. like in Super Mario Galaxy.

I’m having a lot of trouble doing that however.

[http://prntscr.com/guyvh9](http://prntscr.com/guyvh9).

I have created a Raycast Function that lets me get the surface that I want to traverse along.

[http://prntscr.com/guyvq2](http://prntscr.com/guyvq2)

Here I had tried various methods to try and get it to align. I have googled this issue multiple times to find a solution but I can’t find one that worked when I implemented it.

I’m honestly just really stuck here and I have no idea how to continue this. Since I only started using this engine yesterday there is probably something I have missed that can Help me.

TL;DR I originally wanted to get my character aligning to surface normals but I cant get that too work pls help
