Jump to content

Problem with Parrent


Recommended Posts

//mainTerrain.rotation = new BABYLON.Vector3((0*(2*Math.PI/65536))-1.57, (0*(2*Math.PI/65536)), (0*(2*Math.PI/65536)));


The rotation is commented out like every other rotation in the file. Also, no rotations are happening after the clones are assigned the mainTerrain parent. So I'm not sure how simply assigning it to a parent would alter it's rotation. The terrain isn't rotated in the scene, and it's base orientation is no different than the other objects in the Babylon file.

Link to comment
Share on other sites

Just to add a clear "Answered" thread.



Hierarchies are evaluated on every frame.

So any rotations, or translations/positions made to the parent prior to assigning it to children will also be applied to the children when parent is assigned.


All rotations, or translations/positions made after assigning a parent to a child will be maintained with the child in relation to the parent.


Basically in simple terms, don't rotate or move a child until after you've assigned it to the parent, and keep in mind that additional rotations will be in relation to the parent after the parent rotations are applied to the child.

Link to comment
Share on other sites

  • 3 months later...

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