Jump to content

Support for MeshColliders


Dud
 Share

Recommended Posts

Hi all,

 

I'm a complete beginner with Babylon.js but it looks a very promising framework.  I'm interested in making a crazy golf type game and was planning to model some simple golf holes using Blender.  My idea was to model a simple rectangular style floor with a cylindrical hole.  I'd like to then import such a model using Babylon.js and I was hoping that I could apply a mesh collider to the object so that if I were to place a golf ball on the floor and apply a force I could see it drop through the hole.  Is this something Babylon.js could support?  I've looked through the documentation but did not specifically see any mention of a mesh collider which I think is what I would need here.  I get that I could approximate something using box colliders but I'd like something more accurate if possible.

 

Unity supports mesh colliders as does PlayCanvas - but I'd rather use Babylon.js if I can.  Can anyone tell me if they think this would be possible using this framework? I apologise in advance if I have missed something obvious in the docs!

 

Thanks,

Dud

 

Link to comment
Share on other sites

Thanks for the info - but digging around its still not clear if Mesh Colliders are supported or not.  Whilst the article you linked to talks about Mesh Colliders the screenshot is from Unity.  Searching through the docs there does seem to be a MeshImposter type but looking at the SetPhysicsState method on the AbstractMesh class the description says the pyhsics imposter can only be  "The physics impostor Sphere/Box/Plane" which leads me to believe that Mesh Colliders aren't yet supported.  Can anyone else confirm this?

Link to comment
Share on other sites

Maybe you could look with intersectMesh () that detects object collisions with other.

 

All objects can detect collisions in babylon, without the use of physical, but if you need to bounce physics will be essential.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...