2020-03-30 20:07:12 +00:00
|
|
|
#ifndef OPENMW_MWPHYSICS_CONSTANTS_H
|
|
|
|
#define OPENMW_MWPHYSICS_CONSTANTS_H
|
|
|
|
|
|
|
|
namespace MWPhysics
|
|
|
|
{
|
2021-03-21 12:56:56 +00:00
|
|
|
static constexpr float sStepSizeDown = 62.0f;
|
2020-12-27 22:16:11 +00:00
|
|
|
|
2021-03-21 12:56:56 +00:00
|
|
|
static constexpr float sMinStep = 10.0f; // hack to skip over tiny unwalkable slopes
|
|
|
|
static constexpr float sMinStep2 = 20.0f; // hack to skip over shorter but longer/wider/further unwalkable slopes
|
2020-12-27 22:16:11 +00:00
|
|
|
// whether to do the above stairstepping logic hacks to work around bad morrowind assets - disabling causes problems
|
|
|
|
// but improves performance
|
2021-03-21 12:56:56 +00:00
|
|
|
static constexpr bool sDoExtraStairHacks = true;
|
2020-12-27 22:16:11 +00:00
|
|
|
|
2021-03-21 12:56:56 +00:00
|
|
|
static constexpr float sGroundOffset = 1.0f;
|
2020-03-30 20:07:12 +00:00
|
|
|
|
|
|
|
// Arbitrary number. To prevent infinite loops. They shouldn't happen but it's good to be prepared.
|
2021-03-21 12:56:56 +00:00
|
|
|
static constexpr int sMaxIterations = 8;
|
2020-12-27 22:16:11 +00:00
|
|
|
// Allows for more precise movement solving without getting stuck or snagging too easily.
|
2021-11-05 18:45:31 +00:00
|
|
|
static constexpr float sCollisionMargin = 0.2f;
|
2020-12-27 22:16:11 +00:00
|
|
|
// Allow for a small amount of penetration to prevent numerical precision issues from causing the "unstuck"ing code
|
|
|
|
// to run unnecessarily Currently set to 0 because having the "unstuck"ing code run whenever possible prevents some
|
|
|
|
// glitchy snagging issues
|
2021-04-19 11:36:58 +00:00
|
|
|
static constexpr float sAllowedPenetration = 0.0f;
|
2020-03-30 20:07:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|