Hi
Designer here looking for some help.
Just wondering how I can change Camera ID with only one button.
I check this tutorial (https://developer.playcanvas.com/en/tutorials/more-cameras/)
and would like to know how I could assign a button to the camera change function. The code here uses the Keyboard. But I would like to assemble everything on one button instead of the keyboard input.
if (app.keyboard.wasPressed(pc.KEY_SPACE) ) {
this.setCamera('Center');
Here is my Camera ID as an array.
var camera = [];
camera[0] = "Camera_01";
camera[1] = "Camera_02";
camera[2] = "Camera_03";
Also is it possible to have my button outside the Playcanvas window?