Download

Raycast mouse position on plane?

Hi I would like to do the equivalent in UE4 that I did in Unity, as described in this forum post.

Basically I want my 3rd-person character to face in the direction of the mouse. The solution in Unity is to create a plane, parallel to the floor, at the desired height and then to raycast from the mouse’s world position in order to get the intersection with the plane. This is the direction I want my character to face.

Could someone please provide some pointers to how this is done in UE4 using C++?

Many thanks,
Andy