VR Character Script

Hey, I’m having some issues with the code that is attached to my character. It’s not functioning properly and causing the character to move in a jerky and unsmooth way. Do you know what might be causing this problem?

Here’s the link to my game & the scripts:


@Pixels First I am not really sure that this is VR. It looks like third person to me. Also, I am not seeing in your code where you change the animation back to idleanimation. I think what is happening is that when this starts up it is already in the walkanimation state. Similarly when you do use the WASD movement it sets it to walk. Once the user releases the WASD then you should change the state back to idle. If you got the animations from Mixamo be mindful that you should select walk in place option. This way the character will not move forward of it’s actual position. One last thing. I see that there are two scripts that create actions based on the WASD keys. They could fight against each other once you get the above fixed.

In the script with the error please look below

ty// update code called every frame
GirlMovement.prototype.update = function(dt) {
    if (this.app.keyboard.isPressed(pc.KEY_W)) {

    if (this.app.keyboard.isPressed(pc.KEY_A)) {

    if (this.app.keyboard.isPressed(pc.KEY_S)) { // <<<<<<<<<<<<<< this has two ending

    if (this.app.keyboard.isPressed(pc.KEY_D)) {  //<<<<<<<<<<<< Missing )

1 Like