Hey, just wanted to let you know that you are good at making tutorials and I appreciate the video! Audio quality is excellent, and you clearly thought through what you were going to say. Well formatted.
Thank you so much for this internet stranger. I spent hours trying to figure out how to rotate a sprite in game to smoothly align with a randomly changing vector2. You're a life saver!
My only complaint is that you cut the video when you're showing what it does which defeats the point of showing it. Edit: Also, the function gets called twice because it gets called on mouse button down AND up so it's running the tween twice. I was running into some problems where the sprite would be in a random position. To fix it, you can modify the if statement if event is InputEventMouseButton and event.is_pressed() == true:
Im brand new to programming and godot and i spent 11 hours today trying to get an object to tilt back 5 degrees clockwise then counterclockwise and back and forth... i tried writing a counter that counted from -10 to 10 and then counted from 10 back to negative 10 to simplify the problem since i was thinking id have to convert degrees to radians and use -1 to 1... SUBBED, will investigate this video tomorrow!
do you need the tilting to be a constant thing? or only apply when somthing else happens? If its something repetitive that is always occurring such as a pendulum. You might want to look into an animation player. You would set the values of rotation and loop the animation. no script required
@@ericmartine902 Dude if you figure this shit out, let me know, I've been my beating my head against the wall using a tween to make a platform hover....I know about the animation player, but just can't really grasp these tweens. Instead of going back and forth the shit just flies out in one directio...so frustrating - on the verge of Hulking out and throwing my computer out the window
I'll see if I can look into it when I'm by my PC and figure something out. You could probably just chain 2 looping tweens to achieve this, but I'll see what I can come up with :)
@@kimbaptempura4073 func _ready(): var tween = create_tween().set_loops() tween.tween_property(self, "rotation_degrees", 4, 2).set_trans(Tween.TRANS_SINE) tween.tween_property(self, "rotation_degrees", -4, 2).set_trans(Tween.TRANS_SINE) pass This is what i ended up using on my camera and it looks sick. And this is how i did the moving of the paddles side to side. (pong) func _ready(): var tween = create_tween().set_loops() tween.tween_property(self, "position:x", 4.0, 1).set_trans(Tween.TRANS_SINE) tween.tween_interval(0.5) tween.tween_property(self, "position:x", 44.0, 1).set_trans(Tween.TRANS_SINE) tween.tween_interval(0.5)
This is amazing. It reminds me of using flash back in the day. I can't wait for my day off tomorrow so I can start playing with this. Thank you so much for this video. Subbed.
great video! thank you for the tutorial. I like the quick content style. straight forward to the point shows the code and it works. Seriously great! Ive been messing around with tweens myself on 4.0 and I was wondering if you know a way to grab all current tweens bound to a node similar to get_children()? I know you can call is_running, but that is only if you already have access to the tween. I am trying to find a way where i can queue up tween propertys like you do in the vid but with a new click. My thought it fist check for existing tweens with that property and if found then queue the tween_property rather than create a new tween and override the old.
2 months late, but you can just turn on the tween function "set_parallel(true)" so the tweens will run together. And if you want to have a tween happen after those two have run you can either "set_parallel(false)" or use the tween.chain().tween_property
@@queblegamedevelopment4143 to write a tween, we type tween.tween_property($node_name, "property to tween", final value, time). So how are you gonna define the property visible ratio of label? I tried "visible ratio" and "visible_ratio" in place of "property to tween". They won't work....Please help.
Thank you so much for tutorial, I've finally managed to rotate my sprite set amount of degees using as_relative() with action_just_pressed left or right. But sometimes the sprite get stuck in weird angle when im pressing rotate right and left in quick succession or at the same time. Do you know any way of fixing that?
Depends on what you'd prefer, but personally I'd use tweening if the fading is the only value you want to animate. If you have a more complex animation, it might be easier to use a anim player
Моменты с демонстрацией твининга дергаются видимо из за того что удаляли паузы между словами путем вырезания этих фрагментов из видео. Спасибо за туториал.
Is there a way to lock input until the tween has finished? The tween.finished signal seems to fire off earlier than I expect allowing me to enter an input and allow a new tween to start before the first one has ended up at the final position.
Figured it out. You need to add the line tween.finished.connect(FunctionName) and then change your variables in the function. I just thought signals worked like variables and I could just use them in an if statement to check them.
Can you explain me why you choose gatot and not Unreal engine, because it is the Unreal engine is the highest achievement among the engines and the fee for use after the release of the game is not so big
Personally I just like the Godot workflow better, and since I typically create 2D projects, it's much better suited for my situation. In the end though, it's all just preference. So although I highly recommend Godot for the modular structure of most of the systems, and the constant updates in development, UE5 is a much better engine if you're trying to focus on good 3D immersive rendering, or simply just like the workflow better. I'd recommend trying them both out for a while, and seeing which one you enjoy more :)
To add on to what Queble stated. Unreal is also a much larger engine and takes much more work to optimize and run. Although it is a great engine, it is not the best engine. In the same way that a Ferrari is a great car for what it does, if I just need to go a block over to pick up some eggs from the corner store, a Ferrari is not required or even recommended.
I've been led to believe I could use this tween business to make a smooth audio transition. func _ready(): var enginestarting = create_tween() enginestarting.tween_property($EngineDriving, "Volume_dB", 8.0, 5.0) also tried with "Volume dB". Game just crashes and closes instantly
@@queblegamedevelopment4143 ah indeed, thanks! I also had a slightly lacking understanding of what the numbers represented, boy reading the docs sure helps :P
Looking for a chill game dev community?
Join our Discord server here: discord.gg/J7mqN4sV :)
Hey, just wanted to let you know that you are good at making tutorials and I appreciate the video! Audio quality is excellent, and you clearly thought through what you were going to say. Well formatted.
Thank you so much for this internet stranger. I spent hours trying to figure out how to rotate a sprite in game to smoothly align with a randomly changing vector2. You're a life saver!
Extremely useful information with no extra fat. Very good! Thank you!
My only complaint is that you cut the video when you're showing what it does which defeats the point of showing it.
Edit: Also, the function gets called twice because it gets called on mouse button down AND up so it's running the tween twice. I was running into some problems where the sprite would be in a random position. To fix it, you can modify the if statement
if event is InputEventMouseButton and event.is_pressed() == true:
Im brand new to programming and godot and i spent 11 hours today trying to get an object to tilt back 5 degrees clockwise then counterclockwise and back and forth... i tried writing a counter that counted from -10 to 10 and then counted from 10 back to negative 10 to simplify the problem since i was thinking id have to convert degrees to radians and use -1 to 1... SUBBED, will investigate this video tomorrow!
do you need the tilting to be a constant thing? or only apply when somthing else happens? If its something repetitive that is always occurring such as a pendulum. You might want to look into an animation player. You would set the values of rotation and loop the animation. no script required
@@neverknow2474 thanks! good fallback option or even a better solution. Would definitely like to see how it works with code though!!
@@ericmartine902 Dude if you figure this shit out, let me know, I've been my beating my head against the wall using a tween to make a platform hover....I know about the animation player, but just can't really grasp these tweens. Instead of going back and forth the shit just flies out in one directio...so frustrating - on the verge of Hulking out and throwing my computer out the window
I'll see if I can look into it when I'm by my PC and figure something out.
You could probably just chain 2 looping tweens to achieve this, but I'll see what I can come up with :)
@@kimbaptempura4073 func _ready():
var tween = create_tween().set_loops()
tween.tween_property(self, "rotation_degrees", 4, 2).set_trans(Tween.TRANS_SINE)
tween.tween_property(self, "rotation_degrees", -4, 2).set_trans(Tween.TRANS_SINE)
pass
This is what i ended up using on my camera and it looks sick. And this is how i did the moving of the paddles side to side. (pong) func _ready():
var tween = create_tween().set_loops()
tween.tween_property(self, "position:x", 4.0, 1).set_trans(Tween.TRANS_SINE)
tween.tween_interval(0.5)
tween.tween_property(self, "position:x", 44.0, 1).set_trans(Tween.TRANS_SINE)
tween.tween_interval(0.5)
This is amazing. It reminds me of using flash back in the day. I can't wait for my day off tomorrow so I can start playing with this. Thank you so much for this video. Subbed.
Easy, straight forward and I get the solution within the first 2 minutes of the video. Still useful stuff after that, thank you.
That was the best Godot tutorial I've ever seen! Thank you!
You are a life saver! Ive been looking for this for ages! Thank you so much and have a great day!
Best intro out there, thank you so much!
Nice one! I would appreciate a tutorial on how to do Background Loading in Godot 4. The documentation seems to be wrong.
I'll look into it👍
Absolutely wonderful explanation, needed help with tweens in Godot 4, thanks a lot!
great video! thank you for the tutorial. I like the quick content style. straight forward to the point shows the code and it works. Seriously great!
Ive been messing around with tweens myself on 4.0 and I was wondering if you know a way to grab all current tweens bound to a node similar to get_children()?
I know you can call is_running, but that is only if you already have access to the tween.
I am trying to find a way where i can queue up tween propertys like you do in the vid but with a new click. My thought it fist check for existing tweens with that property and if found then queue the tween_property rather than create a new tween and override the old.
This was a great video! i needed info on tweens and got everything i needed! Thanks!
Very nice explanation, I like Your style of teaching in tutorials here on the channel. Thank You
This is so useful!
I ended up using most of it!
I DID learn something! Thank you very much
This was super helpful. Thanks a lot!
Great! I would appreciate a tutorial on how to bind two tweens at once to start together
2 months late, but you can just turn on the tween function "set_parallel(true)" so the tweens will run together. And if you want to have a tween happen after those two have run you can either "set_parallel(false)" or use the tween.chain().tween_property
Awesome! Thank you!
Thank you. You made this very easy to follow. 👍
Thanks man. This was just what I needed.
say i want to draw a line along the path the sprite2d took, how can we achieve this?
Very informative!!! Thx for sharing
Can I tween the width of a line2D node for my laser beam project?
interpolate_property sure was handy..
Hi, can we use tween on visible ratio property of label??
Should be able to! :)
@@queblegamedevelopment4143 to write a tween, we type tween.tween_property($node_name, "property to tween", final value, time). So how are you gonna define the property visible ratio of label? I tried "visible ratio" and "visible_ratio" in place of "property to tween". They won't work....Please help.
@flynnwillis7042 not by my computer right now, but I'll check it out when I get home 👍
Thank you so much for tutorial, I've finally managed to rotate my sprite set amount of degees using as_relative() with action_just_pressed left or right. But sometimes the sprite get stuck in weird angle when im pressing rotate right and left in quick succession or at the same time. Do you know any way of fixing that?
what about loops?
Thanks. This really helped.
does this work for fading in and out or should that be an animation?
Depends on what you'd prefer, but personally I'd use tweening if the fading is the only value you want to animate.
If you have a more complex animation, it might be easier to use a anim player
Thank you! I was able to make it happen easily with a tween and the modulate property!
Bro, that sweet voice in my ear... 😈😈😈
thank you so much!
thank you!!
Моменты с демонстрацией твининга дергаются видимо из за того что удаляли паузы между словами путем вырезания этих фрагментов из видео.
Спасибо за туториал.
Elastic doesn't work well as an IN easing in most cases. How can I have a LINEAR in and ELASTIC out?
Hmm I don't think you can do this in Godot yet, although I think 4.3 might support custom curves for tweens!
@@queblegamedevelopment4143 Actually, it looks like GTweensGodot supports that already.
Is there a way to lock input until the tween has finished? The tween.finished signal seems to fire off earlier than I expect allowing me to enter an input and allow a new tween to start before the first one has ended up at the final position.
Figured it out. You need to add the line tween.finished.connect(FunctionName)
and then change your variables in the function. I just thought signals worked like variables and I could just use them in an if statement to check them.
tween.tween_callback(function_to_call_when_tween_is_completed())
Nice info.
good job!
so no more tweencurves? :(
how do you make code run after the tween is completed
You should be able to connect the Tween's "finished()" signal to your desired function 👍
@@queblegamedevelopment4143 thanks
Thank you
hi! I wanted to ask how to resize an image using the code in 4 godot?
Looks like you can use the 'resize(width, height)' function on an image (obviously in integers)
Add more zoom
nice vid, idk why u have 0 comments tho
Just keep up with Godot versions. The way things change can cause a lot of wasted time. Thanks.
I laugh a little every time I hear tweener
Lol it's even funnier when you explain this stuff to people who don't know anything about computers haha
@@queblegamedevelopment4143 Lol, yep. I work as a data engineer. My wife after 10 years still doesn't know what I do.
Can you explain me why you choose gatot and not Unreal engine, because it is the Unreal engine is the highest achievement among the engines and the fee for use after the release of the game is not so big
Personally I just like the Godot workflow better, and since I typically create 2D projects, it's much better suited for my situation. In the end though, it's all just preference. So although I highly recommend Godot for the modular structure of most of the systems, and the constant updates in development, UE5 is a much better engine if you're trying to focus on good 3D immersive rendering, or simply just like the workflow better.
I'd recommend trying them both out for a while, and seeing which one you enjoy more :)
To add on to what Queble stated. Unreal is also a much larger engine and takes much more work to optimize and run. Although it is a great engine, it is not the best engine. In the same way that a Ferrari is a great car for what it does, if I just need to go a block over to pick up some eggs from the corner store, a Ferrari is not required or even recommended.
tween_property does not exist.
as_relative() saved me so much headache! Thanks for pointing that out!!
I've been led to believe I could use this tween business to make a smooth audio transition.
func _ready():
var enginestarting = create_tween()
enginestarting.tween_property($EngineDriving, "Volume_dB", 8.0, 5.0) also tried with "Volume dB". Game just crashes and closes instantly
Hmm that's odd, what's the error?
It looks like the property is all lowercase (volume_db), so just make sure you don't have any typos :)
@@queblegamedevelopment4143 ah indeed, thanks! I also had a slightly lacking understanding of what the numbers represented, boy reading the docs sure helps :P