This is how I got it working on the frogger game I'm doing for the 20 game challenge, it might not be 100% correct but it might help you...
func _on_body_entered(body):
if body is Player && !body.player_on_platform:
attach_player()
func _on_body_exited(_body):
if ignore_body_exit:
ignore_body_exit = false
else:
if player_in_playable_area(): #inside x bounds
detach_player()
emit_signal("exited_platform")
UE5 is too resource intensive, it also has better support for 2D games, that is what I care about. It can be done in unreal, but Godot makes more sense in my opinion for 2D.
I'm not saying this isn't impressive but, I wish they improved the model if they actually want to charge for it commercially.
alright I'll try that.
This is how I got it working on the frogger game I'm doing for the 20 game challenge, it might not be 100% correct but it might help you...
func _on_body_exited(_body): if ignore_body_exit: ignore_body_exit = false else: if player_in_playable_area(): #inside x bounds detach_player() emit_signal("exited_platform")
func attach_player(): if player.get_parent() != platform: player.player_on_platform = true player.call_deferred("reparent",platform) ignore_body_exit = true
func detach_player(): if player.get_parent() != platform.owner: player.call_deferred("reparent", platform.owner) player.player_on_platform = false
Heartbeast on youtube has really good free tutorials. If you don't mind paying a bit there's this course on udemy by GameDev.tv which is really good to get started. You can usually get it on sale. https://www.udemy.com/course/complete-godot-4-game-developer-2d-online-course/
yes, thanks!
I made a puzzle sokoban game, took me about 2 - 3 weeks to finish.
lol nice.
UE5 is too resource intensive, it also has better support for 2D games, that is what I care about. It can be done in unreal, but Godot makes more sense in my opinion for 2D.
GDQuest is good as well
End of this list.
Back to top