Here are variations on how to rotate an object using visual scripting. For this demonstration I made two cubes rotate automatically as well as via user input. One will rotate using the XBox controller and the other one is controlled using keyboard.
Continuous rotate at a set rate of degrees per second
![](https://apps.dwdenney.com/wp-content/uploads/2023/04/image-8.png)
In the Scripting Graph Blackboard, initialize object variables for rotation degrees per second and amount to rotate per frame.
![](https://apps.dwdenney.com/wp-content/uploads/2023/04/image-13.png)
Then you can use the On Update event handler to set the amount to rotate this frame as the transform to rotate the cube.
Rotate based on joystick X axis input
![](https://apps.dwdenney.com/wp-content/uploads/2023/04/image-9.png)
In the Scripting Graph Blackboard, initialize object variables for the horizontal joystick input and rotation degrees per second – the amount to rotate per frame,.
Use the On Update event node to get the Joystick input axis value
![](https://apps.dwdenney.com/wp-content/uploads/2023/04/image-10.png)
Set the horizontal joystick object variable and then do some math to create a float to send to the rotate transform
![](https://apps.dwdenney.com/wp-content/uploads/2023/04/image-11.png)
Your finished script will look like this. the cube will rotate at a speed that varies based on the sensitivity of your joystick controller. I recommend the Xbox series s 🙂
![](https://apps.dwdenney.com/wp-content/uploads/2023/04/image-12-1024x443.png)