I'm playing around with godot 3 and trying to build a simple flappy birds clone as a learning exercise.
I'm trying to understand whether it is better to use RigidBody2D or KinematicBody2D for the bird.
The bird needs to:
- Ascend when an input (e.g mouse click) is detected
- Descend when there is no input
- Emit a "hit" signal when it collides with an object then stop and descend quickly to the ground.
My understanding is that RigidBody2D has built in physics into the object. This means that the decent of the bird will happen by default, is that correct? Therefore I would need to apply a force to the bird to make it ascend in response to an input.
This sounds like a natural way to do this however the documentation also says:
By default, rigid bodies do not keep track of contacts, because this can require a huge amount of memory if many bodies are in the scene. To enable contact reporting, set the contacts_reported property to a non-zero value.
This would indicate this may not be a good method for a flappy bird.
The next option is KinematicBody2D. However as the docs state, this object is not affected by the physics properties like gravity or friction. Is there a way to manually invoke or utilize these properties easily with code?
Thanks in advance.