user2016210
user2016210

Reputation: 119

How do I slow down the camera's speed moving through a scene in Babylon js?

I have added a FreeCamera to a babylon.2.4.js scene and am controlling its movement with this code:

this.angularSensibility = 5000;
camera = new BABYLON.FreeCamera("FreeCamera", new BABYLON.Vector3(-0.6, -5, -20), scene);
camera.keysUp = [84]; // T
camera.keysDown = [66]; // B
camera.keysLeft = [70]; // F
camera.keysRight = [72]; // H
camera.angularSensibility = this.angularSensibility;
camera.attachControl(canvas, true);

However it moves the camera very quickly through the scene. How might I set the speed to something less?

http://www.visualdiagnostics.ca/eyemap3Djs/magnify.html

Upvotes: 0

Views: 2948

Answers (2)

David Catuhe
David Catuhe

Reputation: 1767

Hello you should just have to reduce camera.speed value

Upvotes: 3

user2016210
user2016210

Reputation: 119

I've found a roundabout way of making movement seem slower simply by increasing the size of the scene. More ground to cover takes longer. However this seems just a hack and not a real solution.

http://www.visualdiagnostics.ca/eyemap3Djs/magnifyBig.html

Upvotes: 0

Related Questions