thanks for the video! I see a lot of tutorials using velocity = move_and_slide(velocity) instead of just move_and_slide(velocity) by itself which seems to work just fine. I'm sure there's a reason but I can't seem the grasp the concept behind it. What exactly is going on there?
`move_and_slide()` returns a modified velocity vector that slides along the colliding surface. This is well-documented: docs.godotengine.org/en/stable/tutorials/physics/using_kinematic_body_2d.html docs.godotengine.org/en/stable/classes/class_kinematicbody2d.html#class-kinematicbody2d-method-move-and-slide
I remember trying to do this in the past on my own and it caused a weird issue clinging to edges when you try to walk off a cliff. Decided to try this again since I'm cleaning up my first person controller, instead of using my homebrew slope detection algorithm. This gives me the same result in much less code. Appreciated!
But how do you stop on steeper slopes instead of sliding? Let's say I don't want to make the slope angle bigger, I want the character to stop on a steeper slope so it's not possible to climb slopes above 45 degrees.
Noticed on the thumbnail that the textures would get blurry at a certain distance, you can fix this by enabling the anisotropic filter in the import tab.
In godot2d, how to generate thousands of units and keep the framerate smooth? I want to keep the units spaced from each other, use collision detection, but it drops frames before 300 unit。so,pleases make a tutorial to teach us! It is said that using the navigation function can be effectively solved, but I don't know how to do it! thanks
This just flat out doesn't work anymore. My character slides regardless of this and everybody keeps pointing to just using "stop on slopes" and it never works.
How would I update the max floor angle to match the player's current rotation? if I want them to be able to walk up any surface, they get slowed down and stuck as the angle increases, even with a max floor angle of 360. At least I'm assuming this feature of move_and_slide_with_snap is what's causing it
My 2d game is little bit stuttering in rendering after exporting it to as a debug apk in android in godot 4.0.3 what should I do its even 21 Mb in length
doesnt solve the issue for me. it doesnt consider it as a wall. I checked with is_on_wall() too. it considers it as a floor but still slides down the slope even with stop on slope turn to true. any ideas?
Below the "solving" piece of code he put in, you can put: if is_on_floor() and velocity.x < 2: #for when you are going right velocity.y = 0 elif is_on_floor() and velocity.x > -2: #for when you are going left velocity.y = 0 It works but only uphill. (tweak the velocity.x values to fit your game) You can also do this for the Z axis too. Unfortunately at the time of writing this I don't know anything that would make it work for when you go downhill.
Hey guys, please help ! Me and my friend want to share our project beetween us to edit in godot, as both wants to manage the project. What can we do ???
@@Kidscancode I do understand the part about inheritance which is why I know it doesn't have the move and slide, but it seems like I don't understand what it really means to be controlled by the physics engine and what kind of limitations that imposes 😅 Any advice on how to learn more about this and what it can can't do? I wanted to make a car controller that is more arkady like the twisted metal games, but after now seeing your video about the arcade car controller, I'm wondering if that would be a better route. If you think it is, is it possible to use a capsule shape instead of a ball in order to move on, or does it have to be a ball so it can actually roll when you're adding force to it? Thank you for your response 🙏
@@shindig9000 Yes, the sphere technique is a sphere so that it will roll when a force is applied to it. Rigid bodies move when forces are applied to them, just like real physical objects. If you want it to move, it needs to be "pushed" by something. This is a great series showing how the vehicle body works: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-B5vE-nNszxA.html
@@Kidscancode Thank you. This has helped a lot. I think one of the last questions I have is what is the best approach to getting a VehicleBody3D to flip right-side-up if upside down? So far I've just tried to change the rotate of the vehicle body but that isn't enough to overcome the physics it seems. This is why I almost wonder if doing your arcade car would be a better approach to make controls like twisted metal, but I think that's going to take a lot of experimentation as well to have other cars interact by their vehicle mesh instead of the ball, but I don't even know if there is a way to transfer collisions from that mesh to change the momentum of the ball and also how you animate the mesh appropriately with that 🤔 Sorry about the long message, but again thank you. This got me a lot further to where I wanted to be.
Y'all Better teach Unity because that engine is very powerful and broad and c# can make you understand Many other languages, Unreal engine is way too advanced for new Developers and Godot is way too Simple for Developers to Get intrigued with