I can not make the camera RadiusLimit
and BetaLimit
to work. Is it because of scene.createDefaultCameraOrLight(true, true, true);
? I have no issues with the ArcRotateCamera defaults. But I need to limit the RadiusLimit
and BetaLimit
. This is how I tried it. No matter what I change, those doesn’t get applied to the camera.
var camera = new BABYLON.ArcRotateCamera("Camera", 1, Math.PI / 2, 1, BABYLON.Vector3.Zero(), scene);
camera.setPosition(new BABYLON.Vector3(0, 0, 20));
camera.lowerBetaLimit = 0.5;
camera.upperBetaLimit = 2;
camera.lowerRadiusLimit = 30;
camera.upperRadiusLimit = 300;
camera.attachControl(canvas, true);
BABYLON.SceneLoader.AppendAsync("assets/model/", "sample.gltf", scene).then(function (scene) {
scene.createDefaultCameraOrLight(true, true, true);
}