Skip to content
← Back to Community
Why is my first person controls not working(three.js)
Profile icon
ahkid7674

Im trying to make a 3d firs tperson game cause im learning three.js and im having trouble with the FirstPersonControls module. WHen i run it and click start the FirstPersonControls is not defined even though i defined it in modules.js and when i try to put it in the same file and make it a module file, it says theres no start function when its there in teh code. Im very stuck so pls help.

Voters
Profile icon
DylanSmith45
Profile icon
ahkid7674
Comments
hotnewtop
Profile icon
QuickV

Maybe try changing the name from FirstPersonControls to firstPersonControls and it might work... Hopefully this answers your question :D.

Profile icon
ahkid7674

i dont think so because it needs to be an object and thats how it is in the docs of threejs but thanks anyway @QuickV

Profile icon
QuickV

ah k... Because I don't know anything about three.js, so I didn't know that. @JULIODIAZ1