# Camera problem in rolling ball game with custom gravity direction (gimbal lock?)

**URL:** <https://forums.unrealengine.com/t/camera-problem-in-rolling-ball-game-with-custom-gravity-direction-gimbal-lock/360528>\
**Category:** Cinematics & Media\
**Tags:** relative, rotation, ball, unreal-engine, question\
**Created:** [June 12, 2016, 3:10pm UTC](https://forums.unrealengine.com/t/camera-problem-in-rolling-ball-game-with-custom-gravity-direction-gimbal-lock/360528 "2016-06-12T15:10:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e2d831d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e2d831d6](https://forums.unrealengine.com/u/anonymous_user_e2d831d6)\
**Post date:** [June 12, 2016, 3:10pm UTC](https://forums.unrealengine.com/t/camera-problem-in-rolling-ball-game-with-custom-gravity-direction-gimbal-lock/360528/1 "2016-06-12T15:10:01Z")

</div>

So, I’ve been working on creating a rolling ball game with a dynamic gravity system and have run into a problem.

I trace to the ground to get the angle of the floor the pawn is on and with “make rotation from axes” create a new rotation for the camera so that the new ground is the new “down” direction. The problem is now that if I try to move the camera it moves relative to the world and not relative to the new plane.

Here’s a small video to illustrate the problem:  
And here’s my blueprint: [Imgur: The magic of the Internet](http://imgur.com/a/YxMQw)

I guess what I am looking for is a camera control scheme that moves the camera relative to a custom plane, but I can’t get it to work.  
I tried implementing this:

 ![42501-upvectorzero.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/b/bbb3fac513a2d15937ff97beaf153a86b8ec7df6.jpeg)  
but it didnt work.
