How do I create a Blueprint function to find the intersection point of a ray and a plane?

How do i create a BP function to find the intersection point of a ray and a plane?

Inputs: RayOrigin, RayDestination, PlaneOrigin, PlaneNormal - Returns True/False and a Vector (Point in the Plane) - Inputs via BP
Returns: True or False if not in plane. A output intersection point (Vector)

Use:
For a click to walk in direction camera controller style (Diablo like)

In the input above, what i will do is:
RayOrigin: Projected Mouse Cursor Screen to World Space
RayDestination: WorldLocation + (WorldDirection * 1000)
PlaneOrigin: Pawn Position
PlaneNormal: Z Vector for a TopDown Game (0,0,1)

Done.

RayPlane Intersection Point (WIP): http://screencloud.net/v/zywL
Rotate Character Pawn based on Mouse Look (WIP): http://screencloud.net/v/rnLv
Video of the Feature (WIP): https://dl.dropboxusercontent.com/u/49868369/UnrealEngine/PawnLookAt-WIP.mp4

RayPlane Intersection Point (WIP): http://screencloud.net/v/zywL Rotate Character Pawn based on Mouse Look (WIP): http://screencloud.net/v/rnLv Video of the Feature (WIP): https://dl.dropboxusercontent.com/u/49868369/UnrealEngine/PawnLookAt-WIP.mp4

Can that be rewritten in C++ code please?

Oh, I did it by myself. Check the answer here: Set collision settings for Brushes - Programming & Scripting - Epic Developer Community Forums
Probably the formula is a bit different, I have no “range” - it just works for every range.

This really helped me out! !

In case anyone wants to use the built in functionality, there’s a Line / Plane intersection blueprint node in UE4 now:

https://answers.unrealengine.com/questions/56656/how-do-you-raytrace-the-mouse-screen-position-onto.html

Does anyone still have the file? The dropbox link no longer works for https://dl.dropboxusercontent.com/u/49868369/UnrealEngine/PawnLookAt-WIP.mp4

Links are broken :frowning:

Ray Plane Intersection in C++

Line Plane Intersection Blueprint Node