Ask coding questions

← Back to all posts
Why is my first person controls not working(three.js)
JULIODIAZ1 (55)

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.

Comments
hotnewtop
QuickV (128)

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

JULIODIAZ1 (55)

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

QuickV (128)

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