Forum Replies Created
-
AuthorPosts
-
Thomas Fabini
CustomerI assume then I only found the part in the code where it affects all collision bodies together, not just the meshes…
I guess it would be great if the devs could patch the output for the physics puzzles for collision meshes to have zero margins in a future version. Since primitives (and static bodies, as you stated) already are set up that way.
Including a puzzle for margin settings would be another option, although I didn’t come across a specific scenario where I would want a non-zero margin. At least not yet.
Thomas Fabini
CustomerHi kdv,
when I tested your second variant, setting the zero margin for both, meshes and primitives seemed to affect collisions primitives in a negative way – meaning that physics objects with those collision primitives would sometimes fall through the floor while collision meshes where ok. Did you encounter this behavior, too?It’s why I went with your first variant, the patched zero margin setting for mesh collision bodies before they are generated.
Thomas Fabini
CustomerYes, nice. Exactly that specific setting I went almost crazy looking for…
If i had known it would magically appear today I might have burned less brain cells in the process…Thomas Fabini
CustomerNice find, thanks for having a look at this.
Hope the devs might take a closer look, too.I’ve ran into these issues mainly with detecting collisions (“detect collision of”) to trigger further actions. They where triggering before the collision bodies where touching. So it was less about the visible margin around physics bodies which I observed only after.
I’ll run some tests, I strongly assume the detection in between mesh collision objects will be more precise which the modified margin.
Thomas Fabini
CustomerHi kdv,
since you patched puzzles.min.js I assume you modified ammo.js rigid body initialization parameters in the methods which are used for the js output of the puzzles.
Since I’m less of a developer – is geometry.setMargin(0) a possible solution to the problem (which could make it to a new version of Verge3D) or rather a quick fix?
Thomas Fabini
CustomerHi kdv,
thanks for pointing out the details and the measurements
– I actually forgot to test all interactions between collision primitives and against collision meshes.
Do you like to fill us in on how you achieved the zero gap collision in your example? Maybe you could attach a working example?
Thomas Fabini
CustomerHi Yuri,
thank you very much for looking into this.
I’m not entirely sure but I assume I was using already Verge3D to 4.2.0 at the time of posting, it seems I updated back in december.
I noticed only after my initial post and further tests that only collision meshes are affected. The collision primitives like box, sphere, cylinder etc. seem to work as expected.
With collision meshes it seems the margin is a constant value which doesn’t change with the scene size. It gets more visible when objects are smaller.
I’ve attached a quick test, physics objects with collision meshes are the red ones.
Thank you,
ThomasAttachments:
You must be logged in to view attached files.Thomas Fabini
CustomerThanks Yuri.
Thomas Fabini
CustomerHi bruno5d,
as far as I can tell, unfortunately not. I don’t assume VR (or more specifically a VR Demo) has been in the main scope of the devs lately.
I ended up taking the Snowballs VR demo puzzles piece by piece apart and integrating and adapting those parts which contribute to VR and controls in a new project. It’s a long and tedious process.Thomas Fabini
CustomerHi Yuri, thank you very much – that’s great news!
-
AuthorPosts