Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Recommend using SI units #284

Open
3 tasks
jcornaz opened this issue Jun 25, 2022 · 1 comment
Open
3 tasks

Recommend using SI units #284

jcornaz opened this issue Jun 25, 2022 · 1 comment
Labels
documentation Changes to the documentation enhancement New feature or improvement examples Changes related to the examples

Comments

@jcornaz
Copy link
Owner

jcornaz commented Jun 25, 2022

@bit-garden rightfully explained here why it is important to not use the pixel as a unit, but rather meter* instead.

*: it is not really about "meter", but rather using a unit for simulation so that object sizes are close to 1. So a game that simulates planetary bodies may use Mm, and a game at a microscopic scale may better use µm.

But that is not so intuitive for users who just start with heron, and they can encounter strange behavior (like #276).

So, here is what we should do to improve heron in this area:

  • Update documentation to recommend using SI units as well as discourage using pixel as a unit
  • Update heron examples to follow that recommendation and show how to use a different unit-scale for the physics than pixels
  • Provide a metric-scale resource, so that heron automatically translates the pixel-unit of transforms into meters in the rapier simulation (something inspired by bevy_rapier's solution)
@jcornaz jcornaz added documentation Changes to the documentation enhancement New feature or improvement examples Changes related to the examples labels Jun 25, 2022
@bit-garden
Copy link

Maybe include a way to dynamically update the pixel to meter ratio for screen resizes, like mobile devices.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Changes to the documentation enhancement New feature or improvement examples Changes related to the examples
Projects
None yet
Development

No branches or pull requests

2 participants