Forum Replies Created
-
AuthorPosts
-
Thomas Fabini
CustomerWe supported the margin parameter in the physics puzzles per request on the forums. As such you can now retrieve and assign margins in runtime–a feature that can greatly improve the stability and performance of physical simulations, especially involving mesh bodies.
Hi Yuri, thank you soo much for adding physics collision margin getter and setter to the new release!
I was able to upgrade our recent VR app with all its complex physics and everything worked right out of the box. I only had to update the parameter name in the puzzles which I had called ‘collision margin’ then instead of ‘margin’.
(Thanks go out to kdv too for his suggestions and solutions which made this request even possible).Thomas Fabini
CustomerThis is a bug that only happens in Puzzles’ performance mode. We’ll fix it in the next update, but for now as a workaround you can just disable the performance mode in App Manager’s settings.
Hi Ivan, thank you very much for your fast reply – I switched performance mode off and everything’s fine now. I’m working with larger puzzles but using mostly Firefox might reduce any performance gain anyhow.
Thomas Fabini
CustomerWe fixed another issue with malfunctioning VR reticles occurred after the VR headset returns from the standby mode. Thanks for bringing this up on the forums.
Thank you very much for fixing the reticles! I was able to test them with pre3 and they work like a charm. Hiding works when entering and exiting VR, as well as getting into and leaving standby on the Quest2.
With pre3 I noticed that the blockly styles are using white backgrounds with a bright font color for the searchable dropdown lists on the dark theme, which are now hard to read. Is this possibly a bug which recently crept in?
Attachments:
You must be logged in to view attached files.Thomas Fabini
CustomerWe fixed the bug with VR reticle which could not be turned off after re-entering the WebXR session. Thank you for reporting this on the forums.
Hi Yuri – thank you so much for fixing this, wasn’t able to test the second pre-release sooner. Currently I’m using 4.4 pre 2 and it works like a charm.
Regarding the reticles I have a question, though: when putting the Quest2 in standby and then back on (while in the VR scene) the standard reticles go back on and won’t turn off anymore, even if hide / get controller ray / reticle is called again .
I assume this is an issue beyond the reach of Verge3D, more tied to the firmware of the Quest2 or the Oculus browser?
Thomas Fabini
CustomerA short addition to my previous post:
I did actually encounter a situation where I needed non-zero collision margins lately:
Trying to stabilize a physics simulation with small objects (around 10cm / 0.1 BU) gaining some speed by falling, I had to modify (raise) the value for the margins. With a zero margin the mesh collision objects where passing right through the floor.Considering this, it might be actually beneficial being able to set specific collision margins for physics objects (mesh and primitives).
The only thing that actually helped, was setting the collision margin in combination with applying high angular and linear damping to reduce the speed.
I do not know if this is a proven way of stabilizing physics collisions with ammo.js, but up to this point I haven’t found another solution – open to any suggestions, as usual.
2023-05-08 at 9:07 am in reply to: VR Reticle Ray can’t be turned of when restarting XR Session #63589Thomas Fabini
CustomerHi Alexander,
thank you very much – I am really glad it is fixable, because I wasn’t able to find any reasonable workaround for this.
Thomas Fabini
CustomerHi Alexander,
Thanks a lot for looking into this.
Thomas Fabini
CustomerThat’s one of workarounds in JS to compare two lists (arrays) .
That’s something I wasn’t currently aware of – thanks for the explanation.
Today I got the whole raycaster setup finally working. At the end things got funny when the raycaster hits rotated objects, specifically dynamically rotated ones, or child objects of rotated parents.
What worked was adding the rotation of the raycast target object to the normal direction while setting and getting all rotations in world space. What helped, too was setting child objects to the -y (as the default raycast) world orientation before parenting.There is still an issue which might relate to Euler rotations and gimble lock, in my setup I can work around it. When it gets to math and vector math my brain goes like “just keep looking for a solution – I’m taking a break “.
Thomas Fabini
CustomerThank you very much for posting your setup…
nice setting the rotation only after the normals change, and setting the additional rotation after setting the direction to the pointer… Is it neccesary converting prevNormal to string before checking it against the current normal? Would checking array against array go wrong?
The setup I use was less slick and efficient, but from the basics pretty similar.
Today I took that into a separate testing scene it actually worked, but it really helped checking the setup against your approach and understanding it further.
The Raycaster seems rock solid, as far as I can tell, it returns definitely face normals unless “point” is checked. https://v3d.net/j2dAttachments:
You must be logged in to view attached files.Thomas Fabini
CustomerI realized that right after sending the post, obviously… duh.
It works flawlessly and beautiful, definitely face normals – your solution is based on puzzles I assume?I’m trying to achieve similar features, only not raycasting from camera / mouse but cast from an object and based on it’s direction in 3D space, and besides maybe some modifications to the cursor based on the uv coordinates returned by the raycaster.
Anyways – your suggestions and findings lead to the conclusion it’s possible, even with puzzles.
Thomas Fabini
CustomerHi kdv,
with your recent post I realized some serious errors in my setup – first one that I was feeding the raycaster the right object for the origin of the raycast, but a direction vector in world coordinates [0,1,0] which does cast, but always in y+ without rotating with the object…
So there’s that. Your info regarding the default raycast direction proved useful because that’s what it did when i fed the object’s direction, casting in y-.
About the point option, I’ve had it off (expecting face normals, instead a single point in space) an on, too – but with the current setup it’s really hard to tell the difference.I will need to do some isolated testing next, take the raycaster features out of the current vr setup and check the basics in a simple test scene.
Thanks again for your hints!
Thomas Fabini
CustomerHi kdv,
thank you very much for your quick answer, right on spot…
Set object direction – for unknown reasons I missed that one. It does exactly the conversion I’m looking for. But with some preliminary testing I assume the normal returned by the raycaster puzzle to be the vector of the object orientation – the aligned object orientates spherical toward the center of the object instead of aligning with its surface, it seems.I’ll try to go with your second suggestion and use the face normals from the api raycaster – besides that one seems to return more data – like the coordinates for a second uv set and pretty usefull stuff.
Anyways, thank you for pointing me in the right direction.
ThomasThomas Fabini
CustomerHi Alexander,
thank you very much for your reply.
I think it’d be awesome if Verge3D could handle this kind of collisions in the near or further future…I have tested the room positioning mode, only to learn that the Quest 2 ignores completely which mode I choose. As far as I get it, it knows only two modes: “Roomscale boundary” and “Stationary boundary” of which the user has to choose one when using the headset. I assume these correspond with “room” and “sitting or standing”. The Quest 2 seems to ignore these settings in the WebXR app and goes with the internal setting.
Anyway, I couldn’t match probably the VR and real world space unless we rent a stadium or a larger hall :) . That’s why I added the controls for moving and rotation, while having the possibility to still walk physically within the defined boundaries.
For now I’m going down the road where I let the physics engine do the heavy lifting and push the entire scene farther when the user hits the walls. In a test setup, against my initial expectations the frame rate didn’t change at all when these collision occurred. But it is still unclear if it’s a real solution to the problem.
Anyways, I’d love to hear if you are implementing anything pointed in this direction or have any other suggestions.
Thanks,
ThomasThomas Fabini
CustomerHi Yuri,
thanks for your fast reply. Since you mentioned Blockly – it appears there are users debating about local variables, or some plugin for local vars… Maybe it’s a feature that will make its appearance in time with Blockly evolving.
Until then I guess it’s all about variable and procedure naming discipline in Puzzles…
Thanks,
ThomasThomas Fabini
CustomerThank you and the team very much for this new version and all the hard work you put into it!
The VR Demo is great, excellent display of how simple VR can be set up within Verge3D, I personally think that’s a great starting point to take projects further.
Allthough I downloaded 4.3 a soon as it was released, I hadn’t had yet the chance to dive into the latest addition (new VR puzzles) and OIT, beside a quick spin. Overall very cool additions, in my opinion all in the right spot. -
AuthorPosts