Download

Got issues with rotations

hey community , i got a small issue ,which cased huge troubles. I got a mirror which needs to rotate on “Y” axis ONLY (Up/Down) once ‘W"’ and “S” keys pressed.
code is shown on the images.Despite , I am adjusting only values of “Y” axis ,the problem is that the mirror some how is rotating in another axises as well, WHY???
I couldnt solve it for a day .
example of initaial mirror position and after i pressed “W” and “S” is shown on the images

Seems like it’s mostly just bad scripting.
No need to make rotators 20 times. There really isn’t even a need to make one.
Or to use a speed value when using a timeline.

Open up the timeline, adjust your output value to be the rotation you expect. Let’s say from 0 to 90 over time…

the pin for the track will now output 0 to 90 over time. Magic.

From update drag off and set rotation.
break the rotation pin.

From mirror, drag off and choose any of the rotations. Probably relative if you set relative.
(I’d go with world so you know the Axis don’t Chage ever).

Anyway, break the rotation pin. grab the axis you need and add the variable from the timer node to it.
then just feed it into the axis of the set rotation. Done.

The other values will remain what they were. no need to make rotators

I did like you u said with a little bit tweaks , and it has worked wonderfully , and the code looks nice , Thank you very much <3