# What is causing the player to drift away from my camera when moving left and right? 

**URL:** <https://forums.unrealengine.com/t/what-is-causing-the-player-to-drift-away-from-my-camera-when-moving-left-and-right/2847946>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [October 31, 2026, 3:16pm UTC](https://forums.unrealengine.com/t/what-is-causing-the-player-to-drift-away-from-my-camera-when-moving-left-and-right/2847946 "2026-10-31T15:16:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDabHand](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheDabHand](https://forums.unrealengine.com/u/TheDabHand)\
**Post date:** [October 31, 2026, 3:16pm UTC](https://forums.unrealengine.com/t/what-is-causing-the-player-to-drift-away-from-my-camera-when-moving-left-and-right/2847946/1 "2026-10-31T15:16:14Z")

</div>

![blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/2/9225139d0c85f4cf76d576fb3802c0286ce27773.jpeg)

so my camera is like a leash. theres a min and a max distance the player can be from the camera and when they are greater than the max distance, the camera follows them, or if the distance is less than the min distance, the camera backs up. In the sweet spot between the min and max, the camera is stationary and just looks at the player.

My problem is that if the player is strictly moving left or right with no forward or backward input, the player should just orbit around the camera at whatever their current distance is. The way it is now, the player slowly drifts away to the max distance. How to go about fixing this?

---

<div class="post-metadata">

**Author:** ![nalbantgokmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nalbantgokmen](https://forums.unrealengine.com/u/nalbantgokmen)\
**Post date:** [November 1, 2026, 12:36pm UTC](https://forums.unrealengine.com/t/what-is-causing-the-player-to-drift-away-from-my-camera-when-moving-left-and-right/2847946/2 "2026-11-01T12:36:18Z")

</div>

That’s geometry, not a bug. Moving exactly sideways relative to the camera means every step goes along the tangent of the circle, and a tangent step always ends a bit farther out: new distance = sqrt(r² + step²). Tiny per frame, but it adds up until you reach the max.

Fix it by orbiting instead of strafing when there is no forward input: angle = speed \* DeltaTime / distance, then Rotate Vector Around Axis on (Player - Camera) with axis Z, and set the player to Camera + that vector, keeping Z. Distance stays exactly constant.
