ViBe Posted June 22, 2016 Share Posted June 22, 2016 Hello, 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: http://www.babylonjs-playground.com/#1V3CAT#146 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 22, 2016 Share Posted June 22, 2016 Hello to move a mesh with collisions you have to use mesh.moveWithCollisions: http://doc.babylonjs.com/tutorials/Cameras,_Mesh_Collisions_and_Gravity Quote Link to comment Share on other sites More sharing options...
ViBe Posted June 22, 2016 Author Share Posted June 22, 2016 Thank you ! I missed this point The updated playground : http://www.babylonjs-playground.com/#1V3CAT#147 webGLmmk and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.