Portal Flipping breaking scale with custom implementation
NextdoorPsycho opened this issue · 7 comments
According to your testing, does the issue occur with ONLY Immersive Portals mod installed?
No
Forge Version
40.1.84
ImmersivePortals Version
Developmental Jar (Im using the API) mod/core: 1.4.12
Latest Log
not applicable (i can still provide if needed)
Crash Report (if applicable)
not applicable
Steps to Reproduce
So this is my implementation.
https://github.com/VolmitSoftware/WormholesFML
Here is a jar you can try on your local if you want: wormholes.zip
but here is a visual and example:
https://gfycat.com/DapperDetailedAntelopegroundsquirrel
What You Expected
When making a portal on the SAME plane, the portals all work fine
So this is what SHOULD happen:
https://gfycat.com/DrearyAdeptHamadryad
When breaking with the "break cluster stick" it all breaks fine unlike when the plane is borked:
Working Close:
https://gfycat.com/ThriftyComplexAntarcticgiantpetrel
What Happened Instead
When making portals on a different plane this happens instead.
This should NOT happen:
https://gfycat.com/ScientificGrimyHuemul
- What looks like an isometric locked viewport or a portalsize of 0.0000001 x 0.0000001
- If i delete the portal this happens: (i need to delete them both, instead of the whole object closing)
https://gfycat.com/UncommonElaborateBellsnake
Additional Details
I'm not sure if I'm doing something wrong, if I am please correct me. But this seems like a render issue that I'm able to replicate consistently with the API.
Im also in the discord as :⋈-NextdoorPsycho-⋈#0001
if you want to message me there!
Please Read and Confirm The Following
- I have confirmed this bug can be replicated without the use of Optifine.
- I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
- I have confirmed this does not happen on the fabric version (If it does please report to here instead).
- I have confirmed I'm not using a hybrid server (Magma, Cauldron) or a different (non official) Forge Server release.
- I have confirmed this issue is unique and has not been reported already.
Seeing from GIF, seems that some of the portal data is broken. You can use /portal view_portal_data
to see the portal data.
And this quaternion creation code is weird: https://github.com/VolmitSoftware/WormholesFML/blob/main/src/main/java/com/volmit/wormholes/PortalUtil.java#L57
It's recommended to use DQuaterion.rotationByDegrees
DQuaternion.rotationByRadians
to create the quaternion.
After all, please tell which specific code you use to edit the portal that caused the issue or I cannot debug this.
Im nor editing the portals, im creating them every instance.
The portal util class is just me creating 2 backed portal groups and spawning them in, is my math wrong for the DQuaterion? ill look into that.
Ill also get back to you on the /portal view_portal_data in a few!
The rotationA, rotationB, rotationC, rotationD are all zero, this shows that the quaternion is broken.
A quaternion is a 4D unit vector, see this for more explanations about quaternion: https://qouteall.fun/immptl/wiki/API-for-Other-Mods.html#about-rotations-and-quaternions
How/Where are you getting the DQuaternion setup for your PortalHelper blocks? im having a hard time finding that in the repo. And thanks for the help. I think the Quaternion Math is not correct now that you mention it
The portal helper quaternion is setup using DiligentMatcher matching the frame https://github.com/iPortalTeam/ImmersivePortalsMod/blob/1.19/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/custom_portal_gen/form/AbstractDiligentForm.java#L23
It's a little complex.
@qouteall You were right, the logic was bad. was normalizing when it could have just used the literal / identity.
thanks for the help!