Jump to content

Drag and Drop mesh and add collision


Recommended Posts


I'm new on the forum. I discover Babylon.js through the samples and the tutorials. I try to apply the concepts in small works and today I have a question.

I made a playground here:


What you can see in this sample is a simple scene with a red box. The red box is included in a hole. I added events to give the possibilities to drag and drop the box. 

It works but now I expect that the box stays in the hole (collision system). Do you know how I can achieve this ? I tried to define the "checkCollisions" property on the different meshes but without success.
I continue to read the documentations about collision, but maybe someone can help me.

Thank you.

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.

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.


  • Recently Browsing   0 members

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