So i noticed this behaviour in the orientation coordinates. BUT ONLY WITH THE X AXIS?
Nothing so far.
What is this? Can i convert it to not be like that (not in workspace but in script)?
So i noticed this behaviour in the orientation coordinates. BUT ONLY WITH THE X AXIS?
I’m confused about what’s happening. Simply showing the Orientation property doesn’t give enough details. Do you have code you can share?
I think hes complaining that after you go past 180 degrees it goes to -180
Y̶e̶s̶ ̶t̶h̶a̶t̶ ̶i̶s̶ ̶e̶x̶a̶c̶t̶l̶y̶ ̶w̶h̶a̶t̶ ̶i̶t̶ ̶i̶s̶.̶
Wait… no. It is that i only change the x orientation coordinate of the part and the y and z changes.
Orientation is determined using Euler angles in the order YXZ. You’re being shown the quickest way to get to that rotation using that method.
You must be changing the orientation by script (only x is changing if using the home, rotate in studio) so may we see the script.
Might be a little off topic but I believe this better fits the Building Support section rather than the Scripting Section, you’re asking a question on the orientation/building, no script to be seen in this post.
No script here.
Try it.
Create a cylinder (1x1x1) and rotate it on the x axis.
This is supposed to be common and might be related to Gimbal Locking. When parts are rotated (with the move tool, it’s by CFrame), the Orientation and Rotation are assigned values from the new CFrame of the part. There are multiple ways to represent the same rotation and sometimes Euler Angles will not rotate an object properly without other changes being made (such as flipping the other axis). If you want to use the rotation values from the object, I recommend calculating your own from the CFrame, calculating them from the directions, or other more reliable methods like storing the rotation as you manipulate it. This video might help with understanding why these changes in the values were made. In the video 2 axis were rotated by 90 degrees in order to perform the rotation.