First Person Character Movement

I am currently working on a small test project/demo for a game. I have made a way to look around and added a scene and item. Though you can look around with the mouse, I have not found a way to move with arrow keys or WASD. I am fairly new to coding, and a young developer with little experience, but help would be nice and reassuring. if you would like to look at the game and help with code editor, please feel free to go on the project, but please ask permission before deleting or adding anything unrelated to this subject. My Project:PlayCanvas | HTML5 Game Engine Thank you!

Hi @Clive_Nelson and welcome,

Check this tutorial and example person on how to get started with input and movement in PlayCanvas:

https://developer.playcanvas.com/en/tutorials/first-person-movement/

Oh, yes, I did see that and tried to get it to work, but the code glitched or something and did not work

So, the main thing missing before everything else, is the Ammo module:

image

Go to your project Settings → Physics → Import Ammo

That will solve the current error your are getting:

Cannot read properties of undefined (reading 'setValue') at RigidBodyComponentSystem.raycastFirst

From there work your way with any other error that may show up, or if not, with testing your movement code.

Thank You! I will try it!