Just try it, and you’ll see the problem.
Link To Editor: PlayCanvas | HTML5 Game Engine
Just try it, and you’ll see the problem.
Link To Editor: PlayCanvas | HTML5 Game Engine
Clicking on all the buttons with my mouse doesn’t do anything?
What are the steps to reproduce this issue? Do you have a video to show? Which code file should we look at?
Nevermind: https://playcanvas.com/editor/code/667901?tabs=28421359
Your variables are global to the whole application rather than scoped to the instance of the script:
//Variables
var Dt;
var vec3 = pc.Vec3;
var run = false;
var jump = false;
var joystickX = null;
var joystickY = null;
var joyTime = 0;
var joyTimer = false;
This means that both UI controllers are changing the same set of variables.
Forgot to include it only works with touch controls. I was in a rush when writing this post.