Change FreeCamera to UniversalCamera

The Documentation says:
“Universal Camera was introduced with version 2.3 of Babylon.js and is controlled by the keyboard, mouse, touch, or gamepad depending on the input device used, with no need for the controller to be specified. This extends and replaces the Free Camera, the Touch Camera and the Gamepad Camera, which are all still available.
The Universal Camera is now the default camera used by Babylon.js.”

API for FreeCamera class says:
Please consider using the new UniversalCamera instead as it adds more functionality like the gamepad.

Still when you open the Playground or create a new Playground you’ll have FreeCamera by default.

Feature request:

  1. Change the default Playground camera to UniversalCamera.
  2. Add the snippet to PG with UniversalCamera.

There was the similar topic recently by @tim-montague but my feature request relates to Playground, not to the Documentation.

1 Like

Wanna do a PR for it?

Need some direction for this.
I found where to add PG snippets - Babylon.js/templates.json at master · BabylonJS/Babylon.js · GitHub

but still cannot find where to change the default PG camera.

In this case when I search where is stored something, I use the global search of Visual Studio Code, here using This creates and positions a free camera (non-mesh) keywords, I think this is the file you want (note that it seems there is not only one file to tweak):

1 Like