Jump to content

blender join mesh are not detected as collision


vahith
 Share

Recommended Posts

hi all,
i trying to use the movewithcollision( ) method on mesh which i created by blender,
if i use single mesh without using join option in blender its working fine, but when i use two meshes join as one mesh then its not working :(
for eg:
if i create one cube in blender then import into  scene then collision is working fine,
but when i am creating two cube then i join as one using join option, now movewithcollision  not working.

 

 

kindly suggest me how to achieve this..

Link to comment
Share on other sites

  • 2 weeks later...

Hi Vahith.  Interesting!  I'm not qualified to comment, but maybe you could answer some questions I have.

 

Do you know if Blender "join"... makes a "subMesh"? 

 

Do you think one of your cubes... is a subMesh of the other?  (after Blender join)

 

And, does moveWithCollision work good for ONE of the cubes in the 2-cube joined test?

 

Have you tried joining the two cubes with BabylonJS mesh merge?  *shrug*

 

It might be interesting to know exactly what a Blender "join" does to a mesh (or two). :)

Link to comment
Share on other sites

hi wingnut..
yes after creating babylon file it containes data someting like this

meshes":[{"name":"Model","id":"Model","materialId":"dc_1.Multimaterial#0","billboardMode":0,"position":[0,0,0],"rotation":[0,0,0],"scaling":[0.01,0.01,0.01],"isVisible":true,"isEnabled":true,"useFlatShading":false,"checkCollisions":true,"receiveShadows":false

subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":183,"indexStart":0,"indexCount":342},{"materialIndex":1,"verticesStart":183,"verticesCount":30,"indexStart":342,"indexCount":54},{"materialIndex":2,"verticesStart":213,"verticesCount":152,"indexStart":396,"indexCount":288},{"materialIndex":3,"verticesStart":365,"verticesCount":54,"indexStart":684,"indexCount":216},{"materialIndex":4,"verticesStart":419,"verticesCount":24,"indexStart":900,"indexCount":36},{"materialIndex":5,"verticesStart":443,"verticesCount":4,"indexStart":936,"indexCount":6}]
 

Link to comment
Share on other sites

Just a guess since you seem to be able replicate this with cubes as well, but could you do an apply of scaling? 

 

I am not that familiar with collisions (yet), but sub-meshes are for multi-materials.  Does problem still happen if you remove all materials?

 

Beyond that, there is this imposter thing.  I am not the source for that.

 

@wingnut - I used Blender join on my blender created checkboxes.  Looked at exported source code (TOB exporter variant), I get no sub-meshes.  Just the global one.

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