Rotate while pressing a key and go back

Hi there,
—I hope you understand my englisch, sorry for that—

I want my Object lean to a specific side, while I pressing a Key. If the key is releassed it should go back.
With a other Key it should lean to a other side.

I search for something like
If “no” key is pressed set “y rotation” to 0°
If “A” key is pressed set “y ratation” to 0.05°
If “A” key is no longer pressed set “y rotation” back to 0°
If “D” key is pressed set “y ratation” to -0.05°
If “D” key is no longer pressed set “y rotation” back to 0°

Instead of set rotation there also could be a animation, but I thought like this it whould be easier to understand.

—my progress so far—
With the Branch-node it worked well for one side. As soon as I copy and adjusted the nodes for the other side it stoped working. Because of the upper nodes want to reset to 0, cos of the “a” key isn’t pressed, and the other nodes want to set the rotation to -0.05, cos the “d” key is pressed.

Did some one understand my problem and could help me solfing this I whould be very happy.

Thx, Quados

I think this is what you are after:


The upper “Set Rotation”-nodes contain y-Values of 0.05/-0.05, the bottom ones 0.

2 Likes

Dame, it was that easy.
Thank you for answering my question that fast. I’m a very beginner with Armory3d and learn with every placed note.