How can I rotate a pawn based on an intersection to his ground plane with the mouse ray?

How to rotate the pawn based on a intersection of his ground plane with the mouse ray in BP?

C++ code reference from our other engine.

Steps:

  1. Get the current Pawn
  2. Create a plane using Pawn origin
  3. Shift the plane Y position by a variable (Ex: Half the player cylinder)
  4. Get mouse X,Y and project a ray in the plane
  5. Use the position and calculate a rotation vector
  6. Apply the rotation to the Pawn

If you can provide a BP print like the below its better.

The accepted answer will populate on a tutorial at the Wiki.

Just an assumption, since I don’t have the time to recreate it right now, I’m gonna assume you graph is debugged and your ray casts works correctly:
Since it’s top down, you should probably get the “Roll” instead.

Hi Darion,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported or have come up with an alternate solution, please respond to this message with additional information and we will offer further assistance.

Thank you.

Hi Darion.
I am using a rotating record. In my game it is an actor. I am following this example because it is relevant to breaking its rotation and allowing mouse interaction with the record on the platter. Should I start over and create a pawn that is a record or can the same principle apply to an actor? (Noobish confusion)