Hey guys,
I have an object that moves around my scene. When the player taps the object I child it to the camera for some relational tweens based on the camera position. That is all working great.
My issue now is when object gets added as a child I would like to keep its starting position the same as it was prior to getting childed.
I found there is a .attach method but it gives me the same results as .add - so I’m not really sure how to approach this.
I am attempting to cache the starting position (world pos) setting the object as a child of the camera and then passing in the starting position again but that also doesn’t do anything.
Relevant code:
var worldPos = this.model.scene.getWorldPosition();
this.stage.camera.add(this.model.scene);
this.model.scene.position.set(worldPos);
Thoughts? Thanks guys!