# Vector Stuff

Hello, since english is not my native language my question may be answerd in this forums (dont really know what to search for)

I got a Cube with random Yaw rotation and i want to know where my Vector (XY) is (Left, Right, Front, Back)

Is this what you’re after?

i will test this when iam home today.

i have a landscape where i can place blocks in Front of me with the camera yaw. i want to snap my preview block either left right forward or backwards oft the nearest block my linetrace Hits the terrain wich. i got things going until the point where it has to decide on wich side of the existing block the New one should be placed/ the preview should snap

Oh, you could try getting the hit’s normal and using that to determine which side to place.

Okay i created myself a little test project using 3Rd Person template… Ive added a blueprint with a static mesh component and an arrow for testing purposes. The Event Graph of the Blueprint looks like this

I am now able to determin at wich degree my player is standing next to the Blueprint actor… The problem occuring now is that this method only allows me to grab 0-180° wich just fulfills 50% of my needs ^^
does anyone have an idea how to do what i did in a better and maybe get me a 0-360° result =)?

(this is the point where i wish i would have paid attention in math class xD)

try using -180 instead of 360. See if that fixes this for you.

If i PrintString the ACOSd result its it ranges from 0 (in front) to 180 (behind) its 90 when my character is left of the object ands its 90 on the other side thats the problem in that case i cant determine if iam left or right if id get a range from 0-180 and -180-0 i would be happy

oh and the Break Rot is for adding the yaw later on(just ignore it for now)

Okay got things working for whos interested in the solution wich basically just tells you if a vector (player positon for example) is in front, back left or right of another actor relative to its rotation… ill upload my project…