Rotate object

I feel real dumb but I can’t figure out how to just rotate an object a certain amount by interacting with a button

use the transform function.
Transform.Rotation to be more specific
this.gameobject.transform.rotation *= Quaternion.AngleAxis(angle, Vector3.up);

to be really specific

I don’t even understand enough to know what this means

So, to move something you “transform” it.
In games, a transform uses 3 numbers, x,y and z lets make things easy snd say x is forwards and backwards, y is lett and right and z is up and down.

those 3 is what you need for moving around in 3d space.

however, rotations are a bit different, since 360 is the same as 0. we still have 3 numbers but they work different. So we use Quaternions for those. you can essentially see those as the x,y,z from earlier but for angles instead.

So to set a rotation you need to define the angle you want to use and what direction you want to use.
for example Quaternion.AngleAxis(90,vector3.up); will rotate it 90 degrees on the horizontal axis.

That all said, you could also just use an animation for it and trigger it with udon…

I appreciate the help but what should this look like on the Udon graph thing? I just want an object to rotate 60 on the z axis when a button is interacted with but I can’t figure it out and no ammount of googling is helping me


Something like this.

Thanks, got it working :+1: