Closed bknill closed 6 years ago
Hi,
Great component.
I'm trying to store the new position, for some reason whenever I reapply the data the entity is always in a slightly different position, usually a bit closer or further away.
I've tried
hotspot.config.position = el.getAttribute('position') hotspot.config.position = el.object3D.localToWorld(new three.Vector3(newPos.x,newPos.y,newPos.z)) hotspot.config.position = el.object3D.localToWorld(new three.Vector3(e.detail.offset.x,e.detail.offset.y,e.detail.offset.z))
All in the on dragend event.
When the entity get's re added to the scene it's slightly moved.
Is there anything in the component that means it's position when ending the drag isn't it's real position!?
Was setting the position on the child not the parent
Hi,
Great component.
I'm trying to store the new position, for some reason whenever I reapply the data the entity is always in a slightly different position, usually a bit closer or further away.
I've tried
hotspot.config.position = el.getAttribute('position') hotspot.config.position = el.object3D.localToWorld(new three.Vector3(newPos.x,newPos.y,newPos.z)) hotspot.config.position = el.object3D.localToWorld(new three.Vector3(e.detail.offset.x,e.detail.offset.y,e.detail.offset.z))
All in the on dragend event.
When the entity get's re added to the scene it's slightly moved.
Is there anything in the component that means it's position when ending the drag isn't it's real position!?