Breakout Ball physics solution. Kinematic2D or RidigBody2D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robster
:warning: Old Version Published before Godot 3 was released.

Hi all,

In my last game (Pong) I used a RigidBody2D for the ball. It worked, it had a few issues but I worked around them.

Trying to do things better each time around I’m now making Breakout (basically the same ball physics) and reading the docs ( http://docs.godotengine.org/en/stable/tutorials/2d/physics_introduction.html ) it says that:

  • KinematicBody2D. Good for moving via code.
  • RigidBody2D. A full physics simulation.

In my mind, looking at that, I’d say that KinematicBody2D is the way to go after reading the docs.
I worry though that I chose a RigidBody2D for some reason that I can’t now recall and want to check in with the community for some advice before kicking into this next game proper.

Could I ask for some advice on this? Thanks so much

:bust_in_silhouette: Reply From: kidscancode

A KinematicBody is the perfect choice for a breakout game. You don’t really need full-on physics - it would be overkill. I think you would wind up fighting against the physics to get things working the way you want. Plus for this type of game you typically want collisions, but not “realistic” ones.

I agree, I did have to do some work arounds in my pong game using the RidigBody2D for a ball. Also, something new to learn and experience and as you say, it appears to be the best way to approach it.

Robster | 2017-04-21 22:59