Download

Change between Actors depending on position

I have a look at rotation applied to an actor when pressing the Q key. Then the player has the option to change to the actor to the left of the current looked at rotation or to the right. So far, I have tried a condition which is if the X of the detected actor is less than the X of the current actor , which would choose the actor on the left, set that one as the new looked at Actor, and if pressed lock on left again, it would choose the actor on the left of the current actor. However the code keeps running through the same list of three enemies: the looked at actor, the enemy on the left and the enemy on the right, it ignores any other enemy that is in the Radius of the Debug Sphere. Any suggestions?