Getting The Left Location of A Mesh?


      I'm trying to get the left most location of a mesh based on where the player character is facing. I have a trace shooting forward from the player character. Once an object is detected, I want to teleport the player to the left side of the mesh. The trace in the code below is working but moving to the left isn't working at all. Any tips?

You need to get a vector in the direction of the side you want and offset it with the according bound in X or Y. That is if you intend for the player to always interact from that side.

Other option for a more dynamic system is to get the direction the player is looking, get right vector and from the targets location, loop with brake to trace and find an available spot to teleport. So the shape of the actor can be any as long as it’s not very wide to avoid many traces from its center.

Like so: AvailableLocationToTheLeft - YouTube

1 Like