How to clamp movement of a component to a circle around its actor.

Use POLAR coordinates to move component, ie. Angles + radius. Will make everything much easier.

Or clamp to circle instead of [x,y]:

  • get vector from pawn to component,
  • normalize it,
  • multiply by circle diameter.
  • You will get new [x,y] that is on circle.
  • Then clamp to that value.