# Help with Zero Gravity first person movement and rotation?

**URL:** <https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [August 10, 2024, 7:13pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348 "2024-08-10T19:13:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samh232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Samh232](https://forums.unrealengine.com/u/Samh232)\
**Post date:** [August 10, 2024, 7:13pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/1 "2024-08-10T19:13:31Z")

</div>

I’m learning to program using visual scripting Blueprints, and am trying to make First Person player movement for Zero Gravity planet-hopping, similar to Outer Wilds, with the player being able to roll the camera and spin 360 degrees pitch (head over heels), with movement and look rotations applied relative to the character at all times. [This person’s video](https://www.youtube.com/watch?v=08CzgLT0AcM) shows what I’m trying to achieve, but in First Person instead of third.

Every time I get any look controls working for this, the inputs always seem to apply relative to the world axis, so when rolled, the player doesn’t rotate in the right directions, and I encounter what I think might be gimbal lock, where rotating in certain axes doesn’t work at all.

I have my look inputs set up to store in variables like so:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/f/8bff61dcf45f660acb981aa47b0abfc5be5ca549.png)  
With the roll input toggled by holding the E key.

My most recent attempt involved trying to use Quaternions, following [this guide](https://www.youtube.com/watch?v=KqbqZ3IY1II&t=538s), but even with the new C++ code inserted and the custom player controller, the rotation isn’t relative to the player / camera.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/0/4b0d69f1d04abb8b22ea663d6ee9b671ec86c9b4.png)

I’d be so grateful for any help with this!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 11, 2024, 6:54am UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/2 "2024-08-11T06:54:00Z")

</div>

Add actor local rotation should be enough, without quaternions.

Are you saying, you want to rotate the player character, relative to the current camera position?

---

<div class="post-metadata">

**Author:** ![Samh232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Samh232](https://forums.unrealengine.com/u/Samh232)\
**Post date:** [August 11, 2024, 5:20pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/3 "2024-08-11T17:20:04Z")

</div>

Hey thanks sm for your reply! Yes that’s exactly what I’m trying to do.

Sadly I’m not having any success with the Add Actor Local Rotation function, the problem seems to be the same: the rotations are applied in directions which seem relative to the world axis, which get pretty crazy / locked as soon as the player rolls.

Current attempt, without quaternions:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/9/81993309b8113ae3e72d11f131bb51142b3c6384.png)

Here’s a video of the problem in engine if that’s helpful:

Any sense of what I’m missing here?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 11, 2024, 8:47pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/4 "2024-08-11T20:47:09Z")

</div>

Rather than getting the right vector of the actor, get the right vector of the camera.

Also, it’s probably better to actually do this inside the player 🙂

---

<div class="post-metadata">

**Author:** ![Samh232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Samh232](https://forums.unrealengine.com/u/Samh232)\
**Post date:** [August 11, 2024, 9:00pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/5 "2024-08-11T21:00:21Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/e/5aec7a7f9e0d6ddea2212c86fd5755abd783bb0f.png)  
Like this? I’ve moved it to the character blueprint and got the camera’s right vector but the problem seems exactly the same, still doesn’t apply the inputs relative to the player / camera, but creates the same look issues in the video above.

Any ideas what to try next? Really appreciate your help!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 12, 2024, 9:57am UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/6 "2024-08-12T09:57:14Z")

</div>

Are you using the first person character for this?

I tried that. Can get a very nice floaty movement, move the direction the camera is facing etc, but can’t do things like roll. I think the character movement might be fighting it.

I made a pawn from scratch, and immediately got it to roll

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/9/f594289876b2c157f1f253d9efb91a21c29e79df.png)

![pawn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/d/8add6f5c4fe4f1af9670ac8c4e537e54ce76d7f3.gif)

Trouble is, you have to code all the movement. Not too bad. I put a zero length spring arm on the camera to get lag…

![pawn2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/8/888a0516badf8db8591638a3cc11a35da3f8fccd.gif)

I’d also take a look at the floating pawn movement component, which might help you… ( that’s what the little spaceship example is using ).

---

<div class="post-metadata">

**Author:** ![Samh232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Samh232](https://forums.unrealengine.com/u/Samh232)\
**Post date:** [September 21, 2024, 7:30pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/7 "2024-09-21T19:30:01Z")

</div>

I honestly can’t thank you enough. Just came back to this after a very busy period at work. Your suggestion of creating a new pawn was exactly what I needed to do. I’d been so bound to the First Person Character I hadn’t realised it would be confining the movement. Weeks of banging my head against the wall for such a simple solution. THANK YOU!

Now I just need to get my planet gravity system working again… Wish me luck!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [September 21, 2024, 8:00pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/8 "2024-09-21T20:00:06Z")

</div>

Good luck! 😆

---

<div class="post-metadata">

**Author:** ![ImYourBeast](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/imyourbeast/32/1220194_2.png) [@ImYourBeast](https://forums.unrealengine.com/u/ImYourBeast)\
**Post date:** [November 21, 2026, 12:50pm UTC](https://forums.unrealengine.com/t/help-with-zero-gravity-first-person-movement-and-rotation/1970348/9 "2026-11-21T12:50:18Z")

</div>

Use Add Actor Local Rotation with the camera right and up vectors so inputs stay relative to the view even when rolled. Store pitch and roll as a quaternion or combine rotators instead of separate Euler angles to avoid the lock you saw. Apply movement from the character forward and right vectors so thrust follows the body. you can also try Gravity Ballistics Toolkit, a Blueprint gravity field with a player controller that keeps mouse look working as gravity changes and a receiver that steers characters along the field: [Gravity & Ballistics Toolkit — Planet Gravity, Zero-G & Arc Prediction | Fab](https://www.fab.com/listings/978bec79-3d77-4ec1-81c1-521d6838651d)
