ArcRotateCamera Invalid location setting

For ArcRotateCamera, use the

camera.position.set(0, 0, -10);


Yes, the proper way to update the position for an ArcRotateCamera is to assign a new Vector3:

camera.position = new BABYLON.Vector3(x,y,z);

That’s because the change in position must be intercepted by the ArcRotateCamera class, something not possible if the set function (or any other function/property) of Vector3 is used instead.


Is this because of the particularity of ArcRotateCamera? For FreeCamera, you can use camera. position set(0, 5, -10)

Yes, there is some additional special code that must be run for the ArcRotateCamera when position is changed.

1 Like

Okay, I see

Just ran into this “issue.”
This looks like a nice comment to add to the documentation. :page_facing_up:

I also think it needs annotation :smile:

1 Like

Do you want to create a PR for it ?

No function development, just want you to add some document comments