Fix T61313: gravity not displayed correct when changing unit scale

Display of velocity and acceleration units should be affected by unit scale.
Arguably the behavior of the physics simulation should be for gravity to remain
constant, but such design changes are outside the scope of bug fixing. At least
the UI should correctly reflect what the physics simulation will do.
This commit is contained in:
Brecht Van Lommel 2019-09-17 13:37:43 +02:00
parent 8f662e84e0
commit c25f5a375e
Notes: blender-bot 2023-02-14 10:37:50 +01:00
Referenced by issue #69934, Walk navigation don't use units from scene
Referenced by issue #61313, Physics ignores unit scale
1 changed files with 2 additions and 0 deletions

View File

@ -1674,6 +1674,8 @@ double BKE_scene_unit_scale(const UnitSettings *unit, const int unit_type, doubl
switch (unit_type) {
case B_UNIT_LENGTH:
case B_UNIT_VELOCITY:
case B_UNIT_ACCELERATION:
return value * (double)unit->scale_length;
case B_UNIT_AREA:
case B_UNIT_POWER: