Sign in to follow this  
Followers 0

Change position of meshes

2 posts in this topic

I have 20 meshes, By connecting each other i make one object and apply rotation to some mashes. Its working fine.

Now i want to change position of all meshes dynamically (As per i got a data from server Ex. x = 2 and y = 3 than move all meshes in x and y direction from current position).

I set one parent mesh for all 20 meshes and set position of parent mesh but when i set position of parent mesh its set position of only rotated meshes. static meshes's positons are not change.

 var parentMesh = BABYLON.Mesh.CreateBox('pmesh',50, scene);
               parentMesh.isVisible = false;
               for (i = 0; i < a1.length; i++)
                  a1.parent = parentMesh;

First add all meshes in array a1.

parentMesh.position.x = a;
parentMesh.position.y = b;

But issue is not apply position change effect to all meshes, few meshes position is as it is not change.

Please help me out of this issue....!!!!!!!!!!!

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  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.