Set GameObject Rotation not working

Hi everyone,

I’m trying to rotate a gameobject 90 deg on the Y-axis.

When I use the “Rotate” node, it seems to give the object a random rotation value.

When I use the “Set Rotation” node, and put 90 deg on the Y-axis, the value just gets reset back to 0 when I compile or emulate the script. It does rotate the object to x: 0 y: 0 z: 0, when the values are reset, but not to the angle I give it.

I also tried the solution from https://ask.vrchat.com/t/rotate-object/5757/4, however, I still run into the same issues as mentioned above.

Please can someone offer some assistance. :pensive:


3
4

is your object inside another object by any chance? I’m not certain if udon rotations use local, relative or global space

Hey Luna, thanks for the reply. The position I’d like the gameobject to rest in sits inside another object, yes.

I’ve tried using the different rotation transform nodes I could find, however, none of them work they way I’d like them to.

My issue seems to be more related to the graph node itself, because whenever I put a rotation value of 90 deg, or any value as a matter of fact, and press “Compile”, the value gets reset to 0 again as shown in the first image attached with the “Set rotation” node.

Am I perhaps missing something in the Udon Graph?

Just to show that the position node works fine:

(node setup - take note of the transform values of the gameobject in the inspector)

(once an on enter event is executed, and the set position is run)

Here is also the overview of my entire node network if that helps in any way:

I’m also pretty new to the whole udon graph interface, so I’m trying to find my way.

Maybe try the “Set eulerAngles” node.

It was as simple as that.

Apologies for the late reply.

Thank you so much. I was using a hacky way to get around it, but this worked nicely!