Line 125 reports an object… difficult to “browse” for me, so far. I don’t do object-inspecting very well… for these a.prototype.b.c.lotsOfMembers objects.
Just possibly… a unique collision-config needs setting, and then the collision masks/groups… will work.
Anyway, we have a testing playground… maybe.
Those properties definitely exist in Ammo. Party on, gang. I hope I have helped.
Yo @trevordev … It looks ammo DOES support collision filter and mask… But i just dont see where to setup that stuff in executeNativeFunction.
Also… In cannon the collisionResponse = false will tell engine NOT TO COLLIDE, JUST PASS THRU… Is great for setting “TRIGGERS”
I found this on stack overflow:
In ammo.js this is solved by setting the collision flag “no_contact_response” or by using so called “ghost bodys” as triggers
But i have no idea how i would set “no_contact_response” flag either.
Can you please help with setting no contact response flag and setting up collision filter groups in ammo.js
Again @trevordev thank for all help… The new babylon toolkit is shaping up great
I managed to support TRIGGERS and CONSTRAINTS for physics with the new toolkit.
FYI … Here is how i am doing that:
UPDATE
Yo @trevordev and @Wingnut check out a better rigidbody unity export setup function using the native Ammo.js API … NOTE: I still need your help with collision groups and Masks
If you can PLEASE still help me figure out what and how to use Ammo.js API for setting collision group and mask… That would be so awesome … Thansk again for all your help
Mackey… have you found ANY AmmoJS demos/examples that use these parameters? (both on rigids and softs).
It’s likely that OIMO belongsTo (a grouping thing) and collidesWith (a masking-by-group thing) are parallels to those two Ammo params you speak-of.
In Oimo, which is just like Ammo only spelt different (not)… I needed to add belongsTo and collidesWith to a custom Oimo impostor and custom Oimo plugin. https://www.babylonjs-playground.com/#1ND6TH#194
Control-F search thru that PG… see how often those terms occur within those custom impostor and plugin classes. Get a “feel” for what it will take. (Yes, I realize that you are only looking for native calls and not necessarily BJS plugin/impostor support).
We need native-call examples, and it’s likely Trevor has not ever seen them either… so pressing him with capitalized “PLEASE”… likely won’t help.
I really doubt that Trevor has any more access to Ammo demos than you do. And, you might need to go to Bullet demos just to find anyone USING those parameters AT ALL. But, drop a line to the author(s) of AmmoJS… and just ask if demos with those two params being used… exist.
“PLEASE”… get some urls, show us code, and then, at minimum, hunt’n’peck Wingnut will start hacking on AmmoJS paddlewheel demo, seeing if I can get an under-the-plugin, under-the-impostor-wrapper… native-call to work.
What is taking so long? C’mon!
Possible Assistance - from pyBullet example line 9. setCollisionFilterGroupMask()
It uses a .urdf file? Universal Robotic Description Format. hmm. Program a ‘robot’… how to “apply” the collision formula(s)? hmm. Object-by-object… custom colliding-formula-values… injection? (via xml files) Nice. Build-it-yourself impostor-shape/behaviors!
Yo @Wingnut … Man i cant find way to set the Collision Group and Mask using the Ammo.js API.
Maybe they just DID NOT EXPOSE the collision GROUP and MASK options to the BODY object along with all the other stuff like body.setCollisionFlags
Bummer… That would have been a kool option to EASE UP things on your OVERALL physics performance. Even Unity DOES NOT have a GUI to assign collision groups and masks… So from a Unity Exporter point of view, I got pretty much the entire Physics Component System exporting as metadata (MeshCollider, CapsuleCollider, SphereCollider, BoxCollider with special support for TerrainCollider that gets used by the Terrain Builder Exporter )
Note: WheelCollider is a special Unity Physics Component design for runtime support to handle wheel physics. It doe NOT really create a COVERAGE COLLIDER for a wheel. Its better to setup a Cylinder game object that is rotated and scaled to cover the wheel and use a ‘Mesh Collider’ component. If you need separate WHEEL physics.
But all and all… I got physics going much better and more complete (including compound collision setup all from the toolkit editor)… Working great so far
Oh, sorry for the slow response, Mackey. From what you said in another thread, I thought you got it figged. Maybe you HAVE, by now.
That Bullet python code that I showed you last post… DOES hint-at exposure, right?
That is a demo… but it IS Bullet and not AmmoJS. Still… one would think that it would work.
Did you talk with AmmoJS author(s) and ask for JS demo that shows collisionFilterGroup and collisionFilterMask usage? I bet they have one, somewhere. Make them cough it up… we could ALL use it’s knowledge.
Do you think you could sort-of ADAPT the Bullet calls in that python code… to be JS calls to Ammo?
I don’t think ‘p’ is a ‘body’ object. import pybullet as p
‘p’ is the physics engine, I think. Not sure.
Let me know when you have talked to the author about a demo and published API. Until we see an AmmoJS API, we’re just speculating and feeling around in the dark, imho.