What I tried
Could not find any information regarding this question via Google Chrome Search Engine or the Site Search feature.
- ROBLOX orientation vs rotation - Google Search
- Search results for 'rotation vs orientation' - DevForum | Roblox
I tried looking at the Wiki documentation but could not find out how either are derived and why there is a difference in Orientation
and Rotation
in some cases for parts facing the same direction.
The only information I could scrape is how the property is applied (Orientation wiki page)
The Orientation property describes the part’s rotation in degrees around the X, Y and Z axes using a Vector3. The rotations are applied in Y → X → Z order. This differs from proper Euler angles, and is instead Tait–Bryan angles which describe yaw, pitch and roll .
I didn’t really understand this however and attempting to read the Wikipedia article just confused me more.
The Problem
I don’t know the difference between the Orientation
and Rotation
property. They appear to be the same in some cases, but in others they’re totally opposite.
I tested this code block twice and got different results:
local part = workspace.Part print(part.Orientation) warn(part.Rotation)
Case 1
Which produced the results:
0, -95, 0
-180, -85, -180
Case 2
Which produced the results:
0, -55, 0
0, -55, 0
I am confused as of why there is a difference in the values, and why it only happens in some cases? I noticed the rotation property appears to be the rotation minus 180 in most cases.