The thing I need to achieve is for example, the start position of mesh A is (1, 0, 0), the position of B is (2, 1, 0), so there are some relative position between A and B, when A change its position, is it possible to know where B should be, if the relative position does not change?
@bghgary might have an explanation basically here the planes do not move at all only the camera is, so you do not need to predict anything, just use the same position for the second plane.
Ah, you’re right, should found some better playground examples, the thing I need to achieve is for example, the start position of mesh A is (1, 0, 0), the position of B is (2, 1, 0), so there are some relative position between A and B, when A change its position, is it possible to know where B should be, if the relative position does not change?
The problem I have now is these two mesh does not load at the same time, so I can’t just setParent, only when A stop moving, B will start to load (need to be put on the relative position of A)
If you know the starting positions then I think you could subtract A’s starting position from B’s starting position to calculate what B’s local position should be.
@pigga the other approach you can take is if you know the required offset between A and B, you can just update the position of B in scene.onBeforeRenderObservable to be B.position = A.position + offset. And if you need to keep the relative position to A when B loads but is determined by the current position of A when B finishes loading, you can then determine in the callback of the loader offset = B.position - A.position and then use that value in scene.onBeforeRenderObservable.