BlackMojito Posted March 7, 2018 Share Posted March 7, 2018 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. Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 7, 2018 Share Posted March 7, 2018 Hi, Do you mean transforms to the geometry? or position/rotation etc'? Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted March 7, 2018 Author Share Posted March 7, 2018 1 hour ago, RaananW said: Hi, Do you mean transforms to the geometry? or position/rotation etc'? 4 by 4 transform matrix, position + rotation. It seems that I need to call Matrix.decompose() ? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 7, 2018 Share Posted March 7, 2018 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 Quote Link to comment Share on other sites More sharing options...
BlackMojito Posted March 8, 2018 Author Share Posted March 8, 2018 9 hours ago, Deltakosh said: 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 Thanks boss! 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.