Jump to content

About mesh.clone()


Recommended Posts

It seems that mesh.clone shares the geometry. But how can I apply different transforms to them then? 

Knowing that I cannot use instances as they do not share the same material.


It seems that AbstractMesh inherits TransformNode. I looked into the source code of TransformNode and I found it was not convenient that we could not directly apply a transform matrix on it. Instead we needed to decompose the matrix into translation and rotation (either to quaternion or to euler angles)? 

Thanks in advance.

Link to comment
Share on other sites

you can either decompose your matrix and apply the component to each mesh or leave the meshes position, rotation and scaling unchanged and directly use the mesh.setPreTransformMatrix function

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