George3D Posted February 22, 2017 Share Posted February 22, 2017 I have this Code to move a player (3rd person) forward and backward, with the arrow keys left-right I can rotate the Player: if (key == 37) // left android.rotation.y -= Math.PI/2; if (key == 38) // foreward android.position.z += 0.5; if (key == 39) // right android.rotation.y += Math.PI/2; if (key == 40) // backward android.position.z -= 0.5; But after a rotation the facing direction is wrong. How can I correct this? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.