Log in to reply
 

Quaternation sh*t



  • I have this painting, apa_p_h_acc_artwalll_03. It's slightly tilted, leaning against a wall:

    		<Pitch>-3.99999809</Pitch>
    		<Roll>1.63242022e-12</Roll>
    		<Yaw>90</Yaw>
    

    In ymap, it comes out as:

      <rotation x="0.0246776585" y="0.0246776585" z="-0.706676" w="0.706676" />
    

    As correctly seen here in CodeWalker (image on the right). But in-game it appears to be standing straight up:

    Rotate already!

    Wut?! We're not talking about some infinitesimal rounding error, here: the painting is tilted for 4 whole degrees! What's going on here?!

    P.S. Whoever thought of this convoluted Quaternation sh*t should be taken into the yard and be shot! :) Nothing but a PITA, and not even working properly!



  • Same issue as yours, I converted the following Menyoo map to .ymap (Los Santos Electric Railway [Replace]洛圣都电气化铁路) but two specific replaced items aren't rotated in-game (rail catenaries replacing prop_cs_20m_rope.ydr and prop_cs_30m_rope.ydr), standing always in a horizontal position when loaded as addon map.

    However they are correctly rotated/shifted when loaded in both Menyoo or Map Editor in-game or when displayed in Codewalker. Weird, weird bug indeed... :/



  • @meimeiriver @UsernameNotRequired I guess you're talking about the ScriptHookVDotNet Quaternion? Have you guys considered to open an issue ticket over at the shvdn repo?
    https://github.com/crosire/scripthookvdotnet/issues



  • @Cyron43 said in Quaternation sh*t:

    @meimeiriver @UsernameNotRequired I guess you're talking about the ScriptHookVDotNet Quaternion? Have you guys considered to open an issue ticket over at the shvdn repo?
    https://github.com/crosire/scripthookvdotnet/issues

    Pardon my daftness, but how does ScriptHookVDotNet play into this?!



  • @meimeiriver It has a Quaternion method. I thought you guys are talking about scripting. See, that's some information missing in the OP's post. Anyway, my bad. Forget that I was here.



  • @Cyron43 said in Quaternation sh*t:

    @meimeiriver It has a Quaternion method. I thought you guys are talking about scripting. See, that's some information missing in the OP's post. Anyway, my bad. Forget that I was here.

    No scripting involved, just a Menyoo map/item converted to ymap. And the rotations DO come out right in CodeWalker. So, Menyoo's got it right, CodeWalker got it right, but just not the game. :)



  • @Cyron43 said in Quaternation sh*t:

    @meimeiriver It has a Quaternion method. I thought you guys are talking about scripting. See, that's some information missing in the OP's post. Anyway, my bad. Forget that I was here.

    There's also this: Quaternion Converter, which confirms the resultant Quaternation values (back and forth). So it's absolutely the game.



  • @Cyron43 Thanks for your suggestion, I don't know if this issue happening with some converted maps is related to ScriptHookVDotNet anyway I opened a ticket on Github if it is indeed the case here: https://github.com/crosire/scripthookvdotnet/issues/726

    @meimeiriver Yes this is the strange part of this problem, the Codewalker app is supposed to display the content almost exactly as it would appears in-game, anyway in our situations the rotation/tilt aren't taken into account only when loaded as addon map.



  • @UsernameNotRequired If you don't call into shvdn with any code, it is not responsible for this issue. This was a misunderstanding from my side. Sorry.



  • @UsernameNotRequired said in Quaternation sh*t:

    @meimeiriver Yes this is the strange part of this problem, the Codewalker app is supposed to display the content almost exactly as it would appears in-game, anyway in our situations the rotation/tilt aren't taken into account only when loaded as addon map.

    And that's the strange part. I've had other occassions, btw, where like a 'cover' object, to seal one of those slightly crooked prop_ld_dstpillar_06 objects, came out straight, instead of the minutely tuned rotations I gave it.

    It's almost as if the game does some 'clever' auto-adjusting at times; but, at other times -- almost always, really -- rotations get obeyed without fault. So, it must be a bug somehow.

    EDIT: Could be the result of some physics conflict too. Not all that likely, but I'm going to test this with the object stand-alone, sans other props around them.



  • @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.



  • @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    LOL, I was thinking the exact same thing. :) Going to test that.



  • @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    One thing, though, the map loads just fine with Menyoo Spooner, with the painting properly tilted. And objects aren't frozen by default in Menyoo. Besides, I don't know of a 'frozen' ymap property, even if I wanted to set it (maybe's it's in that flag number nobody seems to know anything about?).



  • @meimeiriver I can develop an enterprise application but don't ask me about ymap. LOL



  • @meimeiriver said in Quaternation sh*t:

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    One thing, though, the map loads just fine with Menyoo Spooner, with the painting properly tilted. And objects aren't frozen by default in Menyoo. Besides, I don't know of a 'frozen' ymap property, even if I wanted to set it (maybe's it's in that flag number nobody seems to know anything about?).

    FYI, In an unprecedented act of quoting myself, LOL, I think this flag actually makes an object dynamic:

    <flags value="1572865"/>

    And this just keeps it static:

    <flags value="32"/>



  • @meimeiriver Oh I think I just found a fix! In my case every objects were set as static (<flags value="32"/>) but the rotation/tilt weren't taken into account, instead I used the value used for the electric poles (<flags value="1572877"/>). I Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.
    Now magically the rotations are applied! Tada! ^__^



  • @meimeiriver said in Quaternation sh*t:

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    LOL, I was thinking the exact same thing. :) Going to test that.

    Sadly, it didn't work. Painting, stand-alone, is still positioned fully straight, not rotated 4 degrees at all.



  • @UsernameNotRequired said in Quaternation sh*t:

    @meimeiriver Oh I think I just found a fix! In my case every objects were set as static (<flags value="32"/>) but the rotation/tilt weren't taken into account, instead I used the value used for the electric poles (<flags value="1572877"/>). I Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.
    Now magically the rotations are applied! Tada! ^__^

    That's a great find! :) Thank you!!



  • @UsernameNotRequired said in Quaternation sh*t:

    @meimeiriver Oh I think I just found a fix! In my case every objects were set as static (<flags value="32"/>) but the rotation/tilt weren't taken into account, instead I used the value used for the electric poles (<flags value="1572877"/>). I Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.
    Now magically the rotations are applied! Tada! ^__^

    P.S. It's sad to see so many of the old crowd gone, as ymap is just where GTA V began to become real interesting. But, at it would appear, the community can still help each other. :)



  • @UsernameNotRequired said in Quaternation sh*t:

    Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.

    Hmm, I hope you have a backup, LOL, as I just tested this out myself, replacing all '32' flags with '1572877'. That wasn't a success, as several objects lost their collision (and became essentially 'phantom', to speak in Second Life terms). Like heist rugs, for instance. Also, a bag of money I had sitting on the floor got kicked over when I ran into it.

    So, I'm going to reserve 1572877 for objects that absolutely need it. And maybe put an invisible prim.. err, dummy_car over it, so it won't budge (if I ever find out how to set transparency on ymap objects, that is).



  • @meimeiriver Just out of curiosity, would it be possible to make static objects tip over by changing this flag? Trees or powerline posts for instance. It would be great if we could run them over. Oh oh or just think about those wind generators. We could cause some mayhem with these! :D



  • @Cyron43 said in Quaternation sh*t:

    @meimeiriver Just out of curiosity, would it be possible to make static objects tip over by changing this flag? Trees or powerline posts for instance. It would be great if we could run them over. Oh oh or just think about those wind generators. We could cause some mayhem with these! :D

    Not every object became phantom, or I'd have sunk thru the house immediately. :) But many objects lost their collision nonetheless, and/or became moveable. So, this may not work on every tree (or any tree at all, for that matter); but I'm going to experiment a bit with it, and I'll let you know.

    N.B. Slightly unrelated, but it's too bad you don't do ymap. You can really do fun things with it; like scaling objects, for instance. Paintings, for one. Many objects will scale (which I really consider a major thing, building-component wise); but some objects won't budge at all. Hmm, that might actually be flag-related too, LOL. I will experiment with that too.



  • @meimeiriver just try to set other values for pitch for example -8 or 8 and see if object change his rotation, for myself i have sometimes bugs with rotation where are change in something other than Yaw (pitch or roll or both) then i will fix it manually, or snd me just menyoo xml and in free time i will look at it


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.