Orient X and Orient Y
-
I'm editing h4islandxtower.ymap (the files that handle the spawning of idle vehicles in Cayo Perico) and I've got it down smack, but I have no idea what Orient X or Orient Y means. Could someone tell me?
Here's some rockstar original code that is perfect (the Stafford in front of El Rubio's compound) and here's the code I copied.
<Item> <position x="4985.20200000" y="-5694.51500000" z="20.59598000"/> <orientX value="-5.45548900"/> <orientY value="-3.53378200"/> <perpendicularLength value="2.99999900"/> <carModel>stafford</carModel> <flags value="1633"/> <bodyColorRemap1 value="-1"/> <bodyColorRemap2 value="-1"/> <bodyColorRemap3 value="-1"/> <bodyColorRemap4 value="-1"/> <popGroup/> <livery value="-1"/> </Item> <Item> <position x="4477.00000000" y="-4458.00000000" z="5.17300000"/> <orientX value="0.00000000"/> <orientY value="151.44700000"/> <perpendicularLength value="3.20641900"/> <carModel>velum2</carModel> <flags value="3680"/> <bodyColorRemap1 value="-1"/> <bodyColorRemap2 value="-1"/> <bodyColorRemap3 value="-1"/> <bodyColorRemap4 value="-1"/> <popGroup/> <livery value="-1"/> </Item>
-
@zunalegend My guess would be the rotation on the game's plane? In other words, the pitch and yaw? (roll would not be relevant on the ground for a vehicle). Just guessing. What happens when you play with these variables?
-
Playing with the variables rotates the plane, but I've got no idea how to bend the system to my will.
I did some research, and this system is based on Euler angles, and rotating the X or Y axis would have the vehicle's front face up or down, so no idea.
I tried adding an orientZ value and that ended with the plane not spawning at all.
-
@zunalegend interesting. I just tried something. I created a vehicle, reset the rotation with menyoo and then saved the map. Then i rotated the same vehicle a few degrees and saved again. I compared the two files and indeed they had 5 not 6 coordinates. But this is rotation of the object whereas you are seeing rotation of the entire map plane? Anyway i was just curious, not a ymap builder.
-
The vehicle I am using is the Velum 5-Seater. I am seeing rotation of just one vehicle, my bad.
none of the r* made spawns have either orient have an absolute value higher than 7 so i dont think its based on degrees
could be based on a different system but i'm in 9th grade so no idea what it could be
-
FYI i want the spawn to look like this
(https://imgur.com/Y1ssE9j)
-
Just faced the same question and figured it out, that you can get yaw angle as math.Atan2(orientY, orientX), so to dont' bother with math, you can easily use tool like CodeWalker to rotate it properly.
Pitch and roll are not encoded here and probably adjusted, when the actual spawn occurs.Hope it helps.