Orbit pawn around your character?

I’m trying to make a floating pawn (this kind A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums) orbit around my character and fire at other ai enemies.

But I’m not sure how to make it orbit my character, any ideas?

If you want it to move in a predefined path , you can use a spline path (and maybe rotate it by time).
If you want it to be dynamic and random, it all comes to how many math you’re going to use in order to calculate offsets to add to the component (whose parent is your character).

Supposing you have completed the moving part, you can scan for nearby enemies and check if the floating pawn is able to “see” them with a ray trace.

Scanning for nearby enemies is somehwat of a difficult task due to sorting. Thus, I would suggest using a function library for sorting, like this one: UnrealStuff/BluHat at master · ntakouris/UnrealStuff · GitHub