How to use mouse drag to control actor's rotation?

Here is my plan which does not satisfy me, cause actor can’t change its rotation while I drag. It works only when I release my left mouse button.
I prefer the effect when we change the actor’s rotation in the editor. But I don’t want the support UI(editoreffect).

Left Mouse Button is a single action; you’d need to check a condition and apply the desired effect continuously like so:

1 Like

Your solution is better than my plan B. Thank you, @Everynone. Furtherly, I wonder that is it possible to don’t use Event tick to achieve the same effect.

If you want a real-time response from player’s input, you use Tick. Why would you not use Tick for that? If it’s a performance worry, then don’t worry.

I may use lots of this class, it costs.

Just enable and disable tick on the input press and release. Should cut out lots of ticks

Something like this has no performance impact whatsoever. Anyway, this should be most likely implemented in the object rather than Level Blueprint if you’re planning on having more than one of these objects. Unless it’s a this very level’s specific feature.

You can’t save on performance by simply not using Tick, you’re supposed to use Tick, it’s a must. It’s more about what not to do during tick - anything that is not necessary. Placing loops that cast every frame is a good example of what to avoid.

Hmm, I see. I got it. Thank you, guys.

use an input axis. It fires repeatedly like tick as well, but at least it’s not the main tick