# Fighting games character orbits opponent, but moves slightly backwards?

**URL:** <https://forums.unrealengine.com/t/fighting-games-character-orbits-opponent-but-moves-slightly-backwards/2483018>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 30, 2025, 10:12am UTC](https://forums.unrealengine.com/t/fighting-games-character-orbits-opponent-but-moves-slightly-backwards/2483018 "2025-04-30T10:12:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [May 1, 2025, 3:03pm UTC](https://forums.unrealengine.com/t/fighting-games-character-orbits-opponent-but-moves-slightly-backwards/2483018/2 "2025-05-01T15:03:23Z")

</div>

Correct me if I am getting this wrong,

**This is a lock on target, strafe movement.**

It is not the easiest one to handle with blueprints, to be honest doing this perfectly with blueprints only is very hard. Correct way would be using c++ a new custom movement ; calculating where player intends to move and calculate movement vectors relative to target object with some cardinal switches.

In blueprints can be done this way (unless somebody else has another idea)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/0/e1066f8e34df1dee8cbc6f7b5ef4138c7cc43b60.png)

This would results in perfect circle movement as seen below.  
 ![123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/0/4d0d4a49de86eece9a6e0a6d0d5e59196972e420.gif)

The problem is Input and Movement is actually not the same so its not resulting in circle. If you don’t use but teleport or let’s say just move a location of actor it would be a perfect circle as can be seen on target’s spinning actor.

However thanks for the question by the way, it kept me a bit busy and think I will give a shot to do with C++. One thing to keep in mind also about your approach, the error margin is lower when distance to target increases so sprial movement won’t be that noticable when fighting with a distance, but perfect circle also can be achieved.

Edit:

After a little bit more digging around with teleport function possible to achieve similar movement with.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/a/89aa90b1b54c29a59c78d7fa6199c382a1a0c203.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/4/0f4e94398be31a7e58510c5ef63b073a291136f1.png)

Resulting in quite nice motion, I just tested with keyboard, need to check it with gamepad etc.

![321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/a/59a28f60fdc79dbdbc7ac0a4768eb52c3abc921e.gif)

A custom physics movement extension with this logic would solve problem in C++ even more nicely and extendable.

Some similar topics around the subject that I take a look at.

> [@Getting MoveRight to orbit around other object](https://forums.unrealengine.com/t/getting-moveright-to-orbit-around-other-object/451280/9):
>
> So the lastest thing I tried was this: Looking at the picture, if I rotate the character movement inward a bit then the tangent becomes a secant of a circle of radius x. As I change the amount I want the character movement to rotate inward by, I can make the circle the player moves around bigger or smaller. The next challenge would be finding a way to automatically get that value to rotate inward by. Hopefully, this is a good direction to go in resolving this issue.

> [@Player character moves in spiral pattern when strafing around locked-on target](https://forums.unrealengine.com/t/player-character-moves-in-spiral-pattern-when-strafing-around-locked-on-target/654471):
>
> Hi all! I’m making an FPS in UE5 where the player can lock on to targets, similar to Metroid Prime. The lock-on is achieved by setting the player controller’s Control Rotation to the Look At Rotation between the camera’s location and the target actor’s location. I am lerping the rotation, but the problem I’m about to describe persists even when I skip the lerp and set the Control Rotation directly. Here’s the problem: when I strafe around my target, instead of moving in a circle as expected, th…

> [@Player Spirals Away from Object When Rotating Around it](https://forums.unrealengine.com/t/player-spirals-away-from-object-when-rotating-around-it/411514):
>
> Hello! I recently started working on a little game idea I had. In this game, I wanted to have the player character be able to lock on to their opponent and essentially “orbit” them (Think the targeting systems from Dark Souls, Zelda, or most hack-and-slash games). Because I want to have them orbit another actor, spring arm components aren’t really going to work (as far as I’m aware, considering it would require parenting a bunch of actors together which sounds like a nightmare). Ideally, the …

> **[GitHub - mklabs/ue4-targetsystemplugin: Dark Souls inspired Camera Lock On / Targeting...](https://github.com/mklabs/ue4-targetsystemplugin)**
>
> Dark Souls inspired Camera Lock On / Targeting system plugin

> **[GitHub - J1blCblu/LockOnTarget: LockOnTarget system plugin for Unreal Engine](https://github.com/J1blCblu/LockOnTarget)**
>
> LockOnTarget system plugin for Unreal Engine

Let’s keep in mind that target opponent in a fighting game (3d) will always move too, so radius to target will always change. It would be nice to handle

- Target and target variables seperate, distance angle etc.
- Movement seperate since we don’t want movement directly influenced by the target sometimes. if its there is a very large dragon etc.
- Camera is seperate handle since sometimes we dont want to fully lock but a soft lock, camera panning with a weighting towards it or framing. Release soft lock logic etc.

Would like to also ask is it a First Person or Third Person fighting game?

---

_[View the full topic](https://forums.unrealengine.com/t/fighting-games-character-orbits-opponent-but-moves-slightly-backwards/2483018)._
