Due to wrist pain/RSI I won't be able to work on video's for the next couple of weeks/months. I'm sorry if you were looking forward to more videos soon. Hopefully I'll be able to get back to it once it gets better.
I recently started slowly building a game in my free time, and I've gotten ideas that this channel coincidentally has a tutorial for each one. I hope this channel blows up!
It's been a while since you posted, but I wanted to say this video helped me immensely. The official documentation was not clicking and this helped me wrap my head around it. Thank you!!
One of the best tutorials for a beginne like me. You just showed with simple examples how powerful the physics in Godot is! Thank You for the hard work!
I spent my entire morning watching videos to add a swinging mechanic to my game and got nothing useful. After watching this video I had my mechanic in less than one hour. THANK YOU!!!
This video has been so helpful to me, thank you so much! Also you have such a lovely voice I could listen to you for hours. Hope your RSI resolved and you are feeling better (I'd hope so after a year x_x) Be well!
This tutorial is very amazing and really explained a lot about the rigid body. Plus the fact that she genuinely enjoys it really makes it more fun to watch.
Just discovered your channel, great to have good tutorials for Godot, hope you continue to make more. This video helped me get a 3D helicopter/RigidBody3D fully flyable! Thank you!
My physics knowledge isn't super great, but torque is a measurement of a force(Newtons) and a distance(meters), the really high number comes from Newtons being a relatively low amount of force so the final number ends up being pretty high if it's anything with some mass to it.
It also worth noting that angular velocity requires lower values because it is a direct measurement of speed Meanwhile torque is a measurement of force, which includes acceleration (the change of speed over time) and mass
Thank you, thank you! I finally found this tutorial which is very clear. A question: How would I apply force from the centre of an Area2D towards the centre of the ball? So the Area2D would push the ball away towards the direction the ball came from. I'm trying to make a pinball bumper and somehow it's a lot harder than I imagined.
This is awesome. Been looking on how to create a function like this in the likes of Dune! Or tiny wing games. I’m super novice at programming so this shall help. I have all the functions working in my game but this one eluded me, Thank you.
I think, the reason torque needs such a high value to do anything, is that another length measured in pixels factors in here... (Torque being force applied times distance from the center of reference.) (in case of perpendicular force)
3:20 i have a problem im making an area2d that changes the force on a rigid body that enters it and area2d doesn't have integrate forces function edit: nvm you covered area2d edit2: not quite what i needed from area2d but ok
I wonder if the torque needs to be very big since it's measured in mass*(length/time)^2, and since length in Godot are measured in pixels, squaring it would make it very big compared to force which is just mass*length/(time)^2 Would you please do a tutorial on position/angle-setpoint pinjoint motor controller? Thanks in advance
Why do the numbers in torque need to be so huge? The answer is that they are measured in Newton x Metres. Newton is quite a tiny unit. Normally, we would express the 80,000Nm as 80kNm And thank you so much for all the amazing tutorials ❤
UA-cam seems to be deleting comments containing code, so I'll try to phrase this a different way: you can apply a force on the x axis that rotated by the local rotation of the Rigidbody2D, using the vector2(1000, 0).rotated(rotation)
Hi Lucy, you set the gravity scale of the ball to 8.92 and used the default project gravity: 98. Is there some math reason for this? btw: I am trying to make my game less floaty and not sure if I should change the default project gravity or the gravity scale of each object. Thank you and hope you are doing great. Regards from Buenos Aires :)
Well. You can use += to modify the velocity. I need to test the Torque... And figure a way to do Torque and Force at the same time without using the built in methods.
so theoretically you can impulse a car by applying torque to the wheels attached to the structure, instead of moving the car itself ! that is accurate !
If I remember correctly, you can use apply_impule(Vector2(1000, 0).rotated(rotation)) I'm not at my pc right now so I'm not sure I'd recommend having a look at the KidsCanCode video I linked in the description of this video, it also covers how you can make an Asteroids like 2D space ship
@@LucyLavend thanks, i somehow got it working doing as you said, got a couple errors at first because i didnt know how to properly realise your idea, but i got it now. thank you!!!
Late to the game here, but my understanding is that in 3D, the continuous force functions only work in the "_integrate_forces" method of a RigidBody. Not sure why though.
hi, i'm relatively new to godot and i'm getting some weird results when using my c sharp code like the following: rigidBody.ApplyImpulse (Vector3.Zero, impulseDirection.Normalized () * impulseStrength); i had assumed only that rigidbody would be affected but in my tests, other nearby objects also start moving, even if only slightly. if i disable the impulse line then none of the objects move. how do we tell impulse to only affect one object?
I don't know why, but my RigidBody2D simply refused to rotate when applying rotation in code (either via apply_impulse() or apply_torque_impulse(). If you have the same problem, add " yield (get_tree(),"idle_frame") " before applying impulse, because skipping a frame fixes it somehow.
My assumption is that it's due to a very high moment of inertia (rotational mass). The RigidBody is already rather heavy (took a 7,000N force to move it) and the moment of inertia is the mass multiplied by the radius of rotation around the object's axis of rotation _squared_
I'm making a game that will be just a sandbox where you can launch objects of different shapes with different physics parameters. The problem is that absolutely all objects in my case must be Rigidbody2D, otherwise realistic physics modeling will not work (or maybe there is a way ...?) The problem is really serious and i without a single clue how to solve it in my case...
AddCentralForce is really weird... I have no idea why it is implemented like this. Usually it needs to be applied each frame to stay on. It is usually the same is impulse but multiplied by delta
with a kinematic body you have to calculate the forces yourself. You'd have to make your own velocity vector, and apply drag to that. I'd recommend looking at platformer game tutorials for Godot and seeing how they approach it. Specifically how they approach knockback, since that's similar to what you want to do.
@@LucyLavendok, i kind of found out a workaround for this, with a Variable named fall, which is the variable i use for Jump, fall.y, the problem now is, the Enemy Attack can only make me Jump Upwards, fall.z works but my character can't stop walking backwards once the enemy attacks.
Depends on what kind of game you're making and how you rotate the player. If you have a 2D sidescroller and your player is rotated by flipping the sprite, you can multiply the force on the x axis by the x scale of the sprite
Due to wrist pain/RSI I won't be able to work on video's for the next couple of weeks/months. I'm sorry if you were looking forward to more videos soon. Hopefully I'll be able to get back to it once it gets better.
Get well soon!
Thanks Hairic! ♥️
I hope you get well soon! I love your videos, love the presentation and find them really helpful and informative!
@LosfrogerX Thanks for the kind words! 😄
❤❤
I recently started slowly building a game in my free time, and I've gotten ideas that this channel coincidentally has a tutorial for each one. I hope this channel blows up!
Nice! Good luck on your gamedev journey!
@@LucyLavend Thank you!
It's been a while since you posted, but I wanted to say this video helped me immensely. The official documentation was not clicking and this helped me wrap my head around it. Thank you!!
One of the best tutorials for a beginne like me. You just showed with simple examples how powerful the physics in Godot is! Thank You for the hard work!
Thank you! I'm glad you found it useful
The area node explanation is fantastic!! Wish you a speedy recovery so more high quality tutorials will come out!!
I spent my entire morning watching videos to add a swinging mechanic to my game and got nothing useful. After watching this video I had my mechanic in less than one hour. THANK YOU!!!
eyy, nice job!
This is so much what I needed. This helps me understand the differences so well. Thank you!
Wow, that is amazing tutorial :D
I absolutely love that you showing an example for every method, please continue !
Thank you, glad you liked it 😄
Thank you very much for the help! The part about setting a linear velocity was exactly what I was looking for to help me with my project. 👍
This video has been so helpful to me, thank you so much! Also you have such a lovely voice I could listen to you for hours. Hope your RSI resolved and you are feeling better (I'd hope so after a year x_x) Be well!
This tutorial is very amazing and really explained a lot about the rigid body. Plus the fact that she genuinely enjoys it really makes it more fun to watch.
Thank you so much for this thoroughful tutorial! I've understood now perfectly how to work with physics in Godot!
the best tutorial that i find on youtube about this
Just discovered your channel, great to have good tutorials for Godot, hope you continue to make more.
This video helped me get a 3D helicopter/RigidBody3D fully flyable! Thank you!
Great to hear that it was useful to you! 😄
Your videos are excellent. Clearly explained with great examples. Keep up the good work.
Thank you, will do 😄
Bru you are an angel/god for these videos, you deserve as much recognition as Clear Code!!!
Thanks for this, clear and straight to the point!
Epic, just what I needed
Thank you! I was looking for how to move a rolling object using force
My physics knowledge isn't super great, but torque is a measurement of a force(Newtons) and a distance(meters), the really high number comes from Newtons being a relatively low amount of force so the final number ends up being pretty high if it's anything with some mass to it.
Aah that makes sense, a friend of mine calculated that the ball I had in the video was 700kg... so yea that also seems to contributes quite a bit
It also worth noting that angular velocity requires lower values because it is a direct measurement of speed
Meanwhile torque is a measurement of force, which includes acceleration (the change of speed over time) and mass
Great primer to using 3d rigidbodies. I knew a bit of the rigid2d but was too intimidated to mess with it at the time.
I watched this video because I was trying to do what point gravity basically does. Man I could have saved time had I watched this video earlier.
Very nice the Area2D tip! Didn't know... :) Thanks a lot!
Very informative explanation, many thanks!
Thank you, thank you! I finally found this tutorial which is very clear.
A question: How would I apply force from the centre of an Area2D towards the centre of the ball? So the Area2D would push the ball away towards the direction the ball came from.
I'm trying to make a pinball bumper and somehow it's a lot harder than I imagined.
nice and in depth, great tutorial!
You are so wholesome, please make more of these if you can
love you, the world thanks for this high quality godot guide
ah yes, Godot Yeet Masterclass
You enplane things very good.
Thanks a lot I was finding a good video for adding force.
This is awesome. Been looking on how to create a function like this in the likes of Dune! Or tiny wing games. I’m super novice at programming so this shall help. I have all the functions working in my game but this one eluded me, Thank you.
Thanks, glad it was useful!
Thanks Lucy, nice tutorial.
very good video! i learn a lot thank you
Really Good tutorial thank you
annnnd 2 years later this ended my 4 hour issue I was having... thank you lol
Oh wow it's already been two years, didn't realize that. Glad it helped!
Because of this video I'll subscribe😊 thank you this is what i need
Thank you!
I think, the reason torque needs such a high value to do anything, is that another length measured in pixels factors in here... (Torque being force applied times distance from the center of reference.) (in case of perpendicular force)
Extremely useful and well explained
Me: sees thumbnail in 2024
My Brain: “Imaginary Technique… 20 Hour long coding tutorial.”
3:20
i have a problem
im making an area2d that changes the force on a rigid body that enters it
and area2d doesn't have integrate forces function
edit: nvm you covered area2d
edit2: not quite what i needed from area2d but ok
This is so greate! Thank you 👏
Amazing videos
I wonder if the torque needs to be very big since it's measured in mass*(length/time)^2, and since length in Godot are measured in pixels, squaring it would make it very big compared to force which is just mass*length/(time)^2
Would you please do a tutorial on position/angle-setpoint pinjoint motor controller? Thanks in advance
Amazing video! Insta-sub! :D
Shouldn't these forces be applied in "_integrate_forces"?
amazing video
Awesome video! But could you share some code on how I would create a shotgun recoil in 2D? With a rigidbody2D?
Cheers
Why do the numbers in torque need to be so huge? The answer is that they are measured in Newton x Metres. Newton is quite a tiny unit. Normally, we would express the 80,000Nm as 80kNm
And thank you so much for all the amazing tutorials ❤
I know this video is 3 years old but, how can i apply force to a rigidbody2d towards where it's facing?
Applying a force that is rotated by the local rotation of the Rigidbody2D should work:
apply_central_impulse(Vector2(1000, 0).rotated(rotation))
UA-cam seems to be deleting comments containing code, so I'll try to phrase this a different way:
you can apply a force on the x axis that rotated by the local rotation of the Rigidbody2D, using the vector2(1000, 0).rotated(rotation)
@@LucyLavend Thank you so much!
has this changed? I'm trying to apply torque to a propeller and either Godot changed how this worked or I'm doing it wrong...
Hi Lucy, you set the gravity scale of the ball to 8.92 and used the default project gravity: 98. Is there some math reason for this?
btw: I am trying to make my game less floaty and not sure if I should change the default project gravity or the gravity scale of each object.
Thank you and hope you are doing great.
Regards from Buenos Aires :)
Excellent video I subbed😃👍
Great video! Just subbed uwu
Thanks Lucyyyyyyy!
You're welcomeee! 😆
ia their any guidance on linear velocity vs these?
I hope you work on one of these for Godot 4 with Character interactions!
great!
Do you know the mathematics behind all these variables?
I can't find any tutorial on mathematical physics.
Can take a look at Hooke's law
lets say im making a 3d car game, should i use impulses or force?
Well. You can use += to modify the velocity.
I need to test the Torque...
And figure a way to do Torque and Force at the same time without using the built in methods.
Thank you so much :)
so theoretically you can impulse a car by applying torque to the wheels attached to the structure, instead of moving the car itself ! that is accurate !
How'll the car turn? I doubt it is real life like
what if i have a rocketship and make it rotate by, apply_ torque_impulse. how do i make it go forward in the direction it is looking at?
If I remember correctly, you can use apply_impule(Vector2(1000, 0).rotated(rotation))
I'm not at my pc right now so I'm not sure
I'd recommend having a look at the KidsCanCode video I linked in the description of this video, it also covers how you can make an Asteroids like 2D space ship
@@LucyLavend thanks, i somehow got it working doing as you said, got a couple errors at first because i didnt know how to properly realise your idea, but i got it now. thank you!!!
Late to the game here, but my understanding is that in 3D, the continuous force functions only work in the "_integrate_forces" method of a RigidBody. Not sure why though.
Thanks
hi, i'm relatively new to godot and i'm getting some weird results when using my c sharp code like the following:
rigidBody.ApplyImpulse (Vector3.Zero, impulseDirection.Normalized () * impulseStrength);
i had assumed only that rigidbody would be affected but in my tests, other nearby objects also start moving, even if only slightly. if i disable the impulse line then none of the objects move.
how do we tell impulse to only affect one object?
I don't know why, but my RigidBody2D simply refused to rotate when applying rotation in code (either via apply_impulse() or apply_torque_impulse(). If you have the same problem, add " yield (get_tree(),"idle_frame") " before applying impulse, because skipping a frame fixes it somehow.
Can you make a video on how different collision2d bodies push each ??
Thank you... Good examples ,hope i now make better game :)
2:25 Yea I came across these inconsistencies as well, I'd like to know why that is too. Maybe it is a bug?!
My assumption is that it's due to a very high moment of inertia (rotational mass). The RigidBody is already rather heavy (took a 7,000N force to move it) and the moment of inertia is the mass multiplied by the radius of rotation around the object's axis of rotation _squared_
Gracias 😄
Please can you teach how to make a kinematic body fly
I'm making a game that will be just a sandbox where you can launch objects of different shapes with different physics parameters.
The problem is that absolutely all objects in my case must be Rigidbody2D, otherwise realistic physics modeling will not work (or maybe there is a way ...?)
The problem is really serious and i without a single clue how to solve it in my case...
AddCentralForce is really weird...
I have no idea why it is implemented like this.
Usually it needs to be applied each frame to stay on.
It is usually the same is impulse but multiplied by delta
if u don't know i love u sooo much
I think you have omitted the torque in 3D :( otherwise your explanations are very nice to listen and very understandable.
And what about KinematicBody? Is there a way to add impulse to a KinematicBody?
with a kinematic body you have to calculate the forces yourself. You'd have to make your own velocity vector, and apply drag to that. I'd recommend looking at platformer game tutorials for Godot and seeing how they approach it. Specifically how they approach knockback, since that's similar to what you want to do.
@@LucyLavendoh damn.... ok, Thanks for the answer.
@@LucyLavendok, i kind of found out a workaround for this, with a Variable named fall, which is the variable i use for Jump, fall.y, the problem now is, the Enemy Attack can only make me Jump Upwards, fall.z works but my character can't stop walking backwards once the enemy attacks.
muy bueno los tutoriales un tutorial de drawing vector in 3d
Hello im having trouble on something can you please help😭
What are you having trouble with?
how do i add force in the direction the player is facing
Depends on what kind of game you're making and how you rotate the player. If you have a 2D sidescroller and your player is rotated by flipping the sprite, you can multiply the force on the x axis by the x scale of the sprite
3d
@@WOAHVODS I'd recommend looking up some tutorials on 3D projectiles in Godot
Too few subscribers for a good chanel as yours
where go ?
You should also show custom shaders
I'll have a look into that. Would you be more interested in shader code or in using the Shader Graph?
@@LucyLavend Code
@@LucyLavend Or you can show both
This voice is very similar to the Michael Jackson's one. 🎶🎙️🎵🎤
why is this person cute
YABC
😂 🎉😢
why are you so quite?
Thanks for the video!
great video