How can I verify the physics 2D default gravity?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Beamer159

My project is using the unchanged default gravity which has a value of 98. The tooltip says this value represents an acceleration in pixels per second squared. I wanted to confirm with the following method:

  1. Create a RigidBody2D with a CircleShape2D with radius = 10 and position.y = -10. This resulted in the bottom of the circle being at y = 0.
  2. Create an Area2D with a RectangleShape2D with extents.y = 10 and position.y = 610. This resulted in the top of the rectangle being at y = 600.
  3. Measure the time it takes for the circle to fall 600 pixels and hit the rectangle. This took about 3.74 seconds.
  4. Calculate the predicted distance dropped in pixels using x = vi * t + 1/2 * a * t^2. I calculated x = (0)(3.74) + (1/2)(98)(3.74^2) = 685 pixels.

This is significantly different than the expected 600 pixels. Where is the inconsistency? Is it in my method to calculated distance dropped? Are there other physics factors I am not taking into account? Or does the default_gravity property mean something different than my current understanding?

:bust_in_silhouette: Reply From: ponponyaya

I am not good at physics.

But if I 'don’t misunderstanding, I think the fomula you use(x = vi * t + 1/2 * a * t^2) is a free-fall body formula.
For the ideal situations, an object falling without air resistance or friction is defined to be in free-fall.

However godot’s RigidBody2D node did have some resistances, for example “linear damp” and “angular damp”.
And godot’s project itself alse have some resistances, for example “default linear damp” and “default angular damp”.

I guess maybe that’s why it’s different from your expected.