[SOLVED] Unable to make charecter move

I am still pretty new to this and I was watching a video about how to do this, but I think they updated the code editor since then and if i put the line of code he was using into the editor, it says “app is undefined”. I want to move my character with arrow keys.


You need:

if (this.app.keyboard.isPressed(pc.KEY_RIGHT)) {
    this.entity.translateLocal(0.1, 0, 0);

It worked! Thank you so much!

1 Like