Download

Character rotation on 4.15

I’m using this tutorial Blueprint Twin Stick Shooter | v4.8 | Unreal Engine - YouTube to create top down shooter, but I’m only want to use Blueprints. I started with top down template, but I want my character to look at the direction pointed by mouse and move with WASD. I already set movement and its working fine, but I can’t set the rotation. I set everything like in tutorial and its not working. I’ve found a lot of topics showing how to do this, but there are some functions, that I can’t find in newest version of the engine:

  • “Convert Mouse Location to World Space”
    or
  • “Get Hit Result Under Cursor by Channel”

They are not exist or I must do something to make them available?

I JUST did the same things making a Doctor Strange/Diablo inspired game.
In the top down char, you need to find the rotation node, and connect it to the tick.
Right now, it rotates depending on the player clicking.
Connecting to tick will make to rotate period.

Thanks for response.

You mean “Event Tick”? I can connect it only to the last function and it does not help. Here is default blueprint:
Imgur

Ok, that sets rotation on the cursor, but you need setActorRotation to set the actor’s rotation.

Create that, split the pins and only connect the Z or Yaw axis. That’s how you turn your char.

I’m not sure what exactly I need to do, I tried with that:

And its some kind of progress, cause my character sometimes change his rotation, but only in 90% and its verry bugged. I also dont understand, why I couldn’t find function “Get Hit Result Under Cursor by Channel” which I copied from TopDown template.

Look in the Top Down Player Controller. It has the logic to turn the player when mouse is clicked.
Copy paste that logic to the player character BP.

Here is my setup.
I used a look at rotation to get the desired result.