Godot’s Physics2D engine operates on internal, pixel-based units. ΔV needs the data in real-world units, so I need to translate one to another.
I want the physics of the game to be relatable. Todays spacecraft use for thrust and for acceleration, and I want ΔV to use the same, so the player who ever saw an actual space launch can relate the values.
This is the fun part. First, I need to now in what units internally Physics2D engine operates. I found no information on the subject in docs, so i resolved myself to educated guesses:
- Distance is in pixels
- Mass is in whatever you enter (assuming as Godot Mass Unit)
- Weight seems currently broken
- Velocity is in pixels per second
First, my assumptions. My mass unit is and my pixel is wide. That should allow all the necessary conversions from Godot units to real ones:
- The distance is conveniently and .
- Mass is assumed .
- Linear velocity: .
- Force is .
- Impulse is the momentum: .
- Kinetic energy can be derived from mass and velocity as
That’s about all the units I need now – I can translate real thrust to impulse applied and compute impact energy in J (more likely – GJ). Armed with this data we can resume modeling out our game in real units.