Facing issue with updating position of children

Hello All,

I am using an group that contain several objects so after changing the group position by drag and drop.
I am updating the children position as

child.position.copy(child.matrix.getPosition)

I know you guzs may think the right way is

child.position.copy(child.getWorldPosition())

but this is not giving me perfect result

so after updating the position when i am reselecting the objects so my selection boxes comes at the world position

Please see the attached screen shot.

I want that the position update successfully and selection boxes should come along the plates position

  1. It’s not really what anyone thinks - this simply is the right way to find object position in world-space. If it doesn’t work, it may be a good idea to find out why - it suggests that some other part of your code may be incorrect.

  2. Please keep in mind Object3D.getWorldPosition(target) requires an argument vector.

It’s hard to tell what’s wrong from the code you shared - can you please create a codepen that shows how you create and manage groups of objects?

1 Like

Yes you are right @mjurczyk with the world position concept.
These yellow boxes i am getting by this code
boundingBox = new THREE.BoxHelper().setFromObject(object)

here object is the blue plate so after the transformation why this yellow boxes not creating over the plates. Please can you help me with this

I wish i can share the codepen but i cant please help me

Thanks

You don’t have to share your code - you can rewrite just parts of it as a codepen. Without that there’s not much that can be done - since the code is probably the issue.