Rotate actor when key is pressed

I am new to blueprints and cannot figure out how to rotate an actor when a key is pressed. Found numerous threads and youtube videos on how to rotate the actor when the level starts, but not when a button is pressed.

What I’ve done was to convert my static mesh / actor into a BP class, then drag the BP actor into the scene, made it movable and in event graph added the following but the actor is still not rotating:

What am I doing wrong?

Your’re always setting it to 20 on Yaw. That’s what the “SetActorRotation” node does.

Also, you’re using Action input (triggers only once when you press it), you need to use an axis value (which triggers as long as you press it)

And use the “AddRotationNode” instead, which adds a rotation value each time it’s called.

so to your question of “What am I doing wrong?” The answer would be: “every single thing” :slight_smile:

Thanks, I understand now why this doesn’t work but this is still a puzzle to me. How do I know what nodes to use and how to link them? BTW, I don’t have a ‘AddRotationNode’ option. I already watched all UE BP tutorials (beginners) but found them useless as they only explain how to drag and drop them but not how they work.

When I started 3 years ago I went through this playlists in the Unreal Engine Youtube channel. they help me get where I am today.

There’s also this (95% off) Udemy Course by the great Adam Blevins:

I highly recommend it.

You can’t expect to do great things with Unreal if you’re not willing to put in the time. it’s not easy, and is not going to be fast. The sooner you get that clear, the better off you’ll be on the long run.

That’s a good start, thank you!