Drag world instead of single object

Hi there,

I’m new to babylon and out of mathematics for years now - I hope this is not a too silly question…

I like to achieve moving the world (bird’s eye view) under my mouse like dragging an object so that the point under the mouse will be moved exactly to the position after the drag (seems all implementations will move the camera not accurate).
I think I have to intersect (raycast?) an imaginary infinite plane on dragstart and dragend to get the distance I have to place the camera but placing the camera will immediately also affect the plane and thus everything becomes corrupted.

Any suggestions?

Maybe you could use an actual plane and put all the other meshes as children of the plane. Then you simply add a DragBehavior to this plane ???

1 Like

Thank you!
This seems to work but I’m not sure about the performance of childobjects.
As I know moving the world-matrix (e.g. camera) is faster than translating all gameobjects. Are childobjects treated the same way within their parents (e.g. they are not translated via code somewhere and share the same “worldmatrix”)?

1 level is totally fine :slight_smile: