Get point above object that player is looking at and find the vector between the object and point
What I am trying to do is find the vector of a object to a point using the position of the object and the position of the player coupled with the rotation of the camera. How would you recommend finding this vector? (I have done this using the player to object vectors length in the vector from camera rotation but this results in the vector I wish to find not being perpendicular to the player to object vector). In 2D it looks like this:
(comments are locked)

Something like this?
Sorry i was trying to rotate AngleDiff, i meant DistVector ;p corrected You should combine both powers of FVector and FRotator, they both have functions that let you compute positions without knowledge of trigonometry https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Math/FVector/index.html https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Math/FRotator/index.html Anyone doing anything in 3d should know some basic trig. This is high school stuff. I have tried the above solution but it did not work, the blue arrow goes in the wrong direction (representing the resulting vector (see picture). Also there is an error with:
As an FVector has no method for RotateVector but a FRotator does so I made it AngleDiff.RotateVector(DistVector), which is what I think you were getting at in the first comment.
(comments are locked)

Follow this question
Once you sign in you will be able to subscribe for any updates here
I'm not sure how the camera's rotation plays in to this. What does it matter what the camera's rotation is if you just want a point perpendicular to the player>object vector? It sounds like it'd be a fixed world position (based on the player and object locations.)
Must the position be the centre of the screen? You want to find the vector offset from the centre screen position, such that it is perpendicular to the player>object vector?
The camera rotation gives the length of the vector I wish to find such that if I press left mouse down on the object and hold, move the mouse above the object and walk around, the vector I wish to find would be perpendicular to the actors position with a length given by the line made using the cameras rotation.
I can post some code I already have if that helps?
You can find the length of the camera vector using acos and the angle (camera>point, actor>object.) I'm assuming the camera is on the player. Or, at least, you are comparing camera>object and camera>point. Once you have the length, you can multiply it by the camera's rotation vector to get your point. Then use that minus the object's location to get your vector.
angle = 90 * ( 1  ( ( object.location  camera.location ) dot ( camera.rotation.vector ) ) );
cos(angle) = (camera>object) / camera>point)
Therefore camera>point (length) = (camera>object) / cos(angle);
multiply camera>point by the camera's rotation vector to get the point vector.
Take away the object's location form point to get your offset vector. If that first line checks out, I'm not sure. It sounds about right, though. Assuming you want something like this: http://puu.sh/md9t6/dc85d99d0e.jpg
Edit: You'll need to normalise ( object.location  camera.location )