freezy / VisualPinball.Engine

:video_game: Visual Pinball Engine for Unity
https://docs.visualpinball.org
GNU General Public License v3.0
419 stars 62 forks source link

Physics engine uses different units for time #488

Open arthurkehrwald opened 1 week ago

arthurkehrwald commented 1 week ago

Seconds, milliseconds, and microseconds are all used in the physics code. Often without the variable names indicating what unit is used. This is tedious to work with because every time you work with a time variable you have to figure out what unit it is in. Is there any reason not to just use seconds for everything?

freezy commented 1 week ago

Most of the physics code was ported 1:1 from VPX, so much of the nomenclature comes from there.

So no, there is no particular reason, certainly not deliberate, and yes, a PR to improve this is welcome. :)