Convert mouse to world space not working in perspective
I'm trying to make a blueprint that causes an object in the world to follow directly beneath the mouse. It works fine with an orthographic camera, but when I have it set to perspective, the object sits at an arbitrary location in the world and moves only a small amount with the direction of the mouse.
asked May 12 '15 at 07:06 PM in Blueprint Scripting
Just to clear this older question up: The reason this does not work is that you are getting the location in the world for the mouse, which is near the actual camera and not on the ground or something like that.
You are actually missing a raytrace to the ground here (using world location and world direction outputs) and you would need to set the location to this result then.
Especially for a camera with perspective its crucial that you dont just use the output of this function (given that your object is somewhere else on the ground, which i think is true since you are only using the Y value of the vector).
answered Sep 06 '16 at 08:22 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here