Jump to content

Blender & collisions mesh


Recommended Posts



I created a scene (with blender) composed of cubes and a map (plan). 

I checked "enable collisions" for all my objects and only put a mass to my cubes. 


But I have a problem in blender I can't choose "mesh" for my plan to export otherwise it create me an error, so I have to export it as a box. 

But in box mode, if my cube is outside the map (the map is pierced in the middle), the cube stops falling anyway because I chose the box mode. 


I read that there was a notion of precision, but I did not find in blender. 



Thank you for your help.




I work with blender 1.68a and Babylon.js 1.10.

An example to my problem:


Link to comment
Share on other sites

Physics and mass work fine, cubes fall on the map.


Like this:






But when he fall, the collisions are detected like a box for my plan, because I select "box" in shape property.

The "mesh" or "converx hull" in shape property make an error when I export blender to babylon.

Link to comment
Share on other sites

Oh ok!


To try babylon.js, I have thinking to create a little car game.

In my example, the cube will be the car.


Do you think it's possible? If collision detect only box, plane and sphere, I think I have a big problem, because the solution is to make a walls on my map , but the wall can't be a box,plane or sphere too , they are round. And I think the car will be on the wall if the map is like a cube too.


Futhermore, I don't know how to know if the cube is on the map.

The fonction IsIntersect() will give me the same problem with collisions?



Thank you very much for all of your answers.

Link to comment
Share on other sites

Just 'draw' all the collision using boxes through the path, you can go with round walls using boxes as well (just place them that way); probably not the best solution by far, but that's an option, I think. If I were you I would write my own physics rules. Yeah, that's a pain, but that would be much better than using boxes as walls everywhere. Just my opinion here, not even a tip :)

Link to comment
Share on other sites



I have create a square map in "block"(multi box) to make an easy map, it's not funny to design with blender but it's work. :)


Secondly, I have try to move a cube in the runRenderLoop function with for example:

mesh.position.y +=0.1;

But the position don't change, the position stay in the absolute position.


It is normal? Maybe babylon.js have I option to stay in the absolute position?


Thx you.

Link to comment
Share on other sites

When you use physical objects you can't move them just like that (at least I don't know how at moment), but you can apply some force to them, or (even better) place your box on a sphere (make a group) and then make a motor from sphere (or just rotate it, I don't know, didn't played much with it). I think you need to take some closer look at cannon.js, also you can try motor function or 'applyForce', or 'applyImpulse'. Just my thoughts, but that should help you with your project there. Good luck, pwetpwet :)

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...