Unity C# How to rotate an object using key press

Subscribers:
33,700
Published on ● Video Link: https://www.youtube.com/watch?v=Z190R-7pyxc



Duration: 4:10
43,400 views
0


This shows how to rotate and object using key strokes.

First, drag your object from Assets to the scene.

Second, attach a new script.

Add Keycode type variables to the script and designate corresponding keys in the Inspector.

Use eulerangles to perform the rotation.