Difference between sanbox Arch Camera vs mine

Hi again just me

I am setting my current position to 0.0,0 but it rotates on the axis instead of the center, when loading it into the sandbox it works like I want it to but not when I load into my environment

anyone have any ideas?

you want the mesh center?


or center of all meshes (if they’re separate meshes)

BABYLON.Vector3.Center(scene.getWorldExtends().min, scene.getWorldExtends().max)

1 Like

The sandbox is using the framing behavior - Apply Camera Behaviors - Babylon.js Documentation .


I dont have access to Mesh as I append the scene only, When I try to use BABYLON.Vector3.Center these are my initial coordinates . calling that doesnt seem to change anything…

Framing behavior doesnt seem to do the trick either

if possible, can you set up a playground with your scene?
it’ll be easier to see what’s going on.

it seems to work fine in a playground using defaultCamera settting

https://playground.babylonjs.com/#88CB6A#54 I can replicate in my code using scene.createDefaultCamera(true, true, true); but before i was creating my own camera using

var camera = new BABYLON.ArcRotateCamera(“Camera”, 0, 0, 10, new BABYLON.Vector3(0, 0, 0), scene);

is there any limitations using the default or should i be ok?

it should be ok :slight_smile:

1 Like