Download

Rotating an in-game object with the mouse

Hi all, I’m a noob here. Sorry, this might be a really easy question (hopefully!), but I’m trying to have my mouse (pressed) controlling the rotation of an object. I have read through a a few different posts and can understand the logic behind the node positions.

Here is one of the references I checked out: https://answers.unrealengine.com/questions/32503/how-could-i-rotate-an-object-with-middle-mouse-but.html

The problem is, when I go to recreate this layout, I can’t seem to find some of the nodes I need, such as the “SET Can Rotate” checkbox. I tried right-clicking and searching for “set”, or “rotate”, or “can” and it doesn’t appear for any of those keywords. I’m not sure if this matters, but I tried this on an actor blueprint, the player blueprint, and the level blueprint and still can’t figure it out. How am I supposed to know when a node can/cannot be used?

The nodes circled in red are the ones I can’t find at the moment, but these are not the only ones I’ve had troubles with though. Thanks for your help!

MouseRotation_CantFind.jpg

Those are Variables that you must create yourself. The red ones are boolean.

Thank you very much tommytoad! I don’t know why I didn’t think of that, but the mouse-controlled object rotation works now!

Unfortunately now my character cannot move. Does anyone know how to get the player moving again? I’m assuming I will need to link the Branch’s False value into the player Pitch and Yaw, I’m just not sure which node to use for player rotation. Any ideas? Thanks!