BSS Posted August 11, 2015 Share Posted August 11, 2015 HI guys I have one more question for you guys ...I have a scene created in blender and consists of different meshes. Each mesh has child-of constraint which i have added. When this scene is exported to .babylon file and used, there is no parent-child constraint preserved. Do I add this constraint separately or is there any way to use this constraint from blender ? If I have to add the constraint separately then how ? Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 11, 2015 Share Posted August 11, 2015 I don't know about Blender, but I know how to do it in Babylon You can add a parent relationship like this:var mesh = scene.getMeshByName("meshName");var parentMesh = scene.getMeshByName("parentMeshName");mesh.parent = parentMesh; maxime1992 1 Quote Link to comment Share on other sites More sharing options...
BSS Posted August 11, 2015 Author Share Posted August 11, 2015 I tried your code. Its shifting mesh position to another position. Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 11, 2015 Share Posted August 11, 2015 Indeed ! It's because all transformations applied to the parent is also applied to all children.If :parent.position = (1,1,1)andchild.position = (2,2,2),that means the child will be at position (2,2,2) + (1,1,1) = (3,3,3) GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
BSS Posted August 12, 2015 Author Share Posted August 12, 2015 Ya I got it. Thank you 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.