I have searched the complete internet except you no one has explained the character controller with the keyboard keys .. thanks ..I have to decide the class component to functional ....still thank you very much ..hope it will work for me ..
For anyone having their model from Mixamo weirdly teleporting when walking or running:
Make sure to have the "In Place"-option ticked when downloading the animation!
Thank you so much Simon for these videos, I started learning three js and have big projects in mind, found this video tutorial really useful and especially the one when you created the RPG game, still need to get fully confident with javascript classes as I've been only using functions so far, please keep it up!
Simon, you're tutorials are the best! They are information-rich, but straight to the point and easy to follow. Your tone and wry sense of humor also make them a joy to watch. I'm having a blast doing some of these with my son as I teach him to code while keeping him engaged with a subject matter that he loves. Thank you for your time, dedication and generosity in sharing your knowledge!
Thank you so much for sharing all your experience, I'm learning how to code on threejs and I know how to use threejs but I got lost when working on the architecture of the app, your videos and your code on github are amazing, by watching your videos I'm finally learning how to create an architecture, thank you!
awesome tutorial, would love to see you cover this whole thing more in detail as there are basically no such advanced tutorials out there
I just want to thank you so much for all these tutorials. I’ve been learning a lot.
I’m using this here to make a short 3rd person shooter!
I hope you can make a tutorial on something similar soon lol
i just want to let you know i greatly appreciate your work!
The Whole contents of your tutorial is sooooooo helpful, please keep making tutorials!!
Hopefully this will help for my FInal Year Project. Much respect for your sharing sir! keep posting more!
Thanks for an excellent and educational video 🙂It really helped when adding animations to my characters. Your finite state machine design made the animations much easier to implement.
Thanks a ton, I am working on my own javascript threejs game and was bugged by the transitions. Loved it would definitely try this.
Wow !!! You deserve more followers. The example works like a charm.
Your tutorials are great, good bless you friend!
criminally underviewed
Great video as always, thanks for creating it!
A few ideas for future videos:
1) Add clutter to terrain - e.g. rocks, tree - perhaps via simplex noise driving Poisson disk distribution.
2) Collision detection with terrain and clutter - octree, raycasting to collision vertices, collision resolution, etcetera.
3) Pathfinding on terrain with clutter - A* / Voronoi / dynamic nav mesh?
With those topics I think you'll have covered everything required to make a basic game engine in Three.js.
Thanks again, looking forward to your future videos!
Oooh great ideas, adding them to my list.
I've also been kicking around ideas for videos that focus less on coding. Things that draw on my experience. I was technical architect for a big studio (I made technical decisions and roadmaps for the entire company), and a tech lead at Google. Stuff like development process, requirements, how to approach problems, what interviews cover, etc.
0:09 when code runs in first execution
@@AllAboutCode lol man, I had a complete brain shutdown and had no idea what you were saying
Hey Simon, thank you for making all these videos, your fucking awesome man. You have been my go to for learning 3D dev. I was wondering if you have a video explaining the math that goes into moving the character? If not that could be a really good video if you ever got the time too. Thanks again man, stay up.
It would have been nice to see a review of the State class
I've never seen as good as this video explaining action mixer. Can you make a video on handling the animation of a big project with many moving entities? I mean how would you manage all the animations in all your scene efficiently
I have a few games where I already have multiple animated things, is that what you're looking for?
really thank and respect you
awesome video! i was wondering if you could go into more detail on the purpose of creating the character controller proxy?
I didn't like the idea of giving direct access, wanted to decouple the classes, but ended up being overthought and I never removed it.
This is great. It took me a good amount of time to figure out something similar on my own. Blending the animations was a challenge for me. I enjoy the challenge. This helped me learn some ways to optimize my code. Thank you for sharing your knowledge.
Possible video request? Mash this with the How many AI agents can Javascript handle. I've been working on a multiplayer project for some time and I can only manage to get about 3 or 4 before It gets really laggy. How many do you think is possible using node js as the server? Thanks again.
Good idea, I've had a small mmo on my list for a while for when I have some time. I've written the client/server for a few in the past, they had large player bases but weren't too complex.
Cool!
your the man
Thanks for the tutorial , Just a doubt if we can change body dimensions of the model using three.js
have you thought about teaching in react-three-fiber?
love the tutorial too btw
I want the character to walk by default, and run when pressing shift. But the transition from walk to run is weird. A very short run animation is shown only after the shift keyup event fired. But the transition from run to walk is fine.
this good hen you change the states with keyboardinput but how do you do it for a character that is not controlled by the player
Hi Simon, would you do a video on how to create an NPC character from scratch with ThreeJS?
Hey, how can I use the controller for AI character input? Do you have plans to make a video on that? Thank you
HeySimon.
Thanks for such an insightful video.
I am adding 3 to four more assets to my scene like car, tree, building etc. But when i move character it passes through my other assets such as car, building. Can you please add colission in the same example.
Thank you in advance
Hi, SimonDev Nice tutorial, and thanks for the lessons. How would one implement functionality where one can have a search bar and on typing the name of the animation and pressing enter the animation is fetched and played instead of pressing certain keys on the keyboard?
I think you need to look at how the dance animation is triggered, and then just move that code to when your search bar triggers.
Great stuff! Really unique. Subbed :) Watched dozen of your videos and can't find any explanation of movement algorithm used in Update() method. Especially using timestamp as multiplier and _A / _Q / _R stuff. Am I missing something? Can you point me to any tutorial or documentation?
Ah it's just applying rotations from key presses and some velocity to move the character around, sorry didn't cover that.
Dear Simon, I'm looking for speech control for character in three JS. Please help me to find out one example how can I get that not using AWS Sumerian host. Thank you.
How would I make the character jump?
i try to add backward animation from mixamo, but when the animation start it won't stop, any idea ?
hey my character kinda walks then jumps back and continues the walk animation (same with the run animation), i think this is a timing issue with the mixer, based on how im updating the mixer. any tips on how to fix this?
thanks
Can you do similar videos for react three fiber?
How would you convert this for touch screens / mobile?
Hey, I'm very new to threejs and web development in general. My question is, are those properties like _params, _manager, etc. already defined somewhere or are they user defined?
Brother can you tell me, from where you get these fbx animations (dance, running etc) as a separate files. I download from deepmotion but they are within the character. I also need separate files.
Sorry if I missed this in a previous video but how can you tell if an animation is compatible with your model?
I don't check that, the animation was downloaded with the model from Mixamo, so compatibility was virtually assured.
There may be internal checks on Three.js's part to ensure compatibility between the skeleton and animation, but I didn't do anything extra.
Is there a way to detect a joypad (generic GENIUS gaming pad?) to do this same thing?
I would love to see you explore godot engine.
Could you do a video for adding animations from custom blender models that can't be uploaded to mixamo?
@0:36
Where have I seen that walk before? Ah yes people coming out of Taco Bell.
I'm confused
Hey I'm beating my head against ammo js and I wondered if you have any insight into using btKinematicCharacterController? I'm not finding anyone who has used it in ammo js, but I may also just not be too bright lol
Now I'm working with fire! What's the deal with all the underscores in your code? (probably a very junior question)
I've been super inconsistent with coding style, that's all. I try to follow the Google style guide in later videos.
@@simondev758 Those freakin psycopaths lol. Interesting, I'll check out this style guide.
Ok this is going to sound weird but
I was messing with the code you provided on GitHub and I mirrored the zombie in blender on its local z axis and now the plane lost its shadow and the zombie is full of light
Any reason for this?
Assuming your mesh is still ok and not inverted or something weird, might be the material has changed.
These are random guesses. Honestly still getting grips on Blender myself, spent most of my professional career using Maya/3ds Max.
Hey. I have used this tutorial to make one character move, but I have ran into a problem. Basicly the character runs very fast, and after like half a second it gets send back. I think the animation is way faster than the position change, so the animation goes fast but he gets sent back to where his position is. I dont know how to sync the two. Any1 can help?
It sounds like the animation you're using also animates the character's position. Ie. the character actually moves forward as part of the animation. If you're using mixamo, there's an option when you choose an animation to make it "in place", so they'll do the walk animation but in the same spot. Then you can change their position from code.
Once you have loaded in a model e.g the zombie could you add .json motions to it?
Not quite sure what you're asking, but if you're asking if you can load an animation separately from the model then yes you can totally do that.
Do you have a PayPal for donations? These are great tutorials. One thing I've never quite liked about FSM is that they don't allow for a combination of states without making ad hoc combined states for a specific grouping. I've used hierarchical state machines before which are pretty flexible but not perfect. What are other alternatives you're aware of?
I've got a patreon (www.patreon.com/simondevyt), I never turn down coffee/beer. Can't say that I know offhand something better, but I can poke around some papers and stuff to see if anybody has something better.
@@ralusek Nah unfortunately not. It's cool if you're not big on Patreon, I'll look into other options at some point too. Until then, stick around and enjoy the videos either way!
is there explanation for _RAF and _Step?
does this work in the local space or global?
Can u plse make video of how to upload 3d model to website, and fix AR view option to it
@@simondev758 ss, When can i expect that video, Iam eagerly waiting for that
@@powerpawankalyan7749 I'm not sure, I tend to try to have topics already in progress, so maybe a few weeks if I end up trying to take this on.
Thanks for the tutorial. I would love to see the code and follow it myself. Can you place the code on your github?
@@simondev758 Yes, thank you! This was very helpful, and definitely answered many of my questions. Thanks again!
What will be the velocity.z calculation of jump?
Just apply an impulse of some kind, depending on the effect you want.
I can make a note to make a video that includes a jump in the future, if that would be helpful?
Can you explain the entire update function which is in the BasicCharacterController as it has velocity calculation and some other stuff I didn't get it
Also, I am unable to load any other file I changed the file path and everything but it gives me a warning that "FBXLoader.js:669 THREE.FBXLoader: ShininessExponent map is not supported in three.js, skipping texture." and unable to load the function
Sounds like a problem with the exporter, but I've heard the FBX one isn't prioritized vs the gltf exporter. Where did you get this model? Have you tried a gltf instead?
@@simondev758 Thank you so much for everything and for replying. Your tutorials are amazing plz don't stop making them. I really need to learn a lot.....Thank you so so so so muchh....!!!
@@thakkerrpiyu3815 No worries, keep learning and don't be shy about asking questions. Can't promise I can answer every one of them, but I'll still try.
i downloaded the files from the repository and every browser display them completely black. What happened?
They need to be hosted, easiest way is to do it locally using vscode, python, node, etc. Can't just open it in a browser.
@@simondev758 ohhhh okay, most tutorials about "3d in browser" just shows all steps but they rarely tell u the hosting par. Thank you!
i demand an update method explaining as i don't exactly understand what's going on in the code , if you can speak of the details regarding the calculations you've done and the reason behind them.
I find it a little hard to understand especially from the variable name choices (_R,_A,ect).
So if you're free to make a quick tour on that function it would be appreciated , i know it might be tedious to remember a logic you've made three years ago (probably more depending on you github) , or maybe you've discovered a better way to recreate it even for all we know.
Aw man , just checked your lates video and the gap between them tells me you're tightly busy.
Well gonna have to figure it out myself , thank you for this video and code nonetheless , having a good code reference helps more than one thinks.
Your efforts are appreciated mate.
If you enjyoed this, check out my GLSL course: simondev.teachable.com/p/glsl-shaders-from-scratch
Or support me on patreon!: www.patreon.com/simondevyt