Sign in to follow this  

multiple mesh models

Recommended Posts


I have inherited a model that has several layers.  Its a vehicle that is broken down into engine, body, exhaust, and break systems.  Each component is a new mesh layer.
As I was using babylon js to iterate through the layers of the model, I noticed that every mesh in the entire model has a position of (0, 0 , 0).  Is this normal?

Share this post

Link to post
Share on other sites

haha.  That sounds SO goofy, but true. 

I guess... what?   Slowly rotate each mesh, and it's easier to see offset-distances of vert positions... from mesh 0,0,0 origin.

Likely, the point-of-pivot will NOT be in the center of the actual mesh-"volume" (on certain layer-mesh).

I think there is a way to set the mesh origin to a more bounding-box-centered position.  Some setPivotPoint or setPivotMatrix BJS feature.  Here, I found this, somewhere:

mesh.setPivotPoint(mesh.getBoundingInfo().boundingBox.centerWorld, BABYLON.Space.WORLD);

I dunno what that stuff does, but it's fun to experiment-with.  I hear makeGeometryUnique() ensures that pivot point changes happen on THIS mesh only, and NOT its parent.  Clones are also involved, and possibly instancesForum search for 'makeGeometryUnique' == good idea.

Ok, that's enough Wingnut interrupting/yammering for THIS post.  :) Party on!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.