I want to lock camera rotation with clamp function, I m unable to get X rotation of camera gameobject, and idk why this doesnt want to work Processing: problem.png…
yeah I m unable to understand thiss , plz tell me how to get actual X rotation of gameobject and use it with clamp function
I’ve not worked with Visual Scripting, but I think the problem here is that you are taking the X component of a Quaternion, and this is not the same thing as the rotation about the X axis.
Quaternions are vectors with four components - X, Y, Z, and W - that can specify the orientation of an object in 3D space. Despite having the same names as the X/Y/Z axes, they are not related at all.
If you want to get the rotation about the X axis as shown in the inspector, then I think you should try the eulerAngles
property of the Transform
. Hopefully this is available via the visual scripting.
1 Like