StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::Physics::CharacterSettings Struct Reference

Public Attributes

float mass = 70
 Character mass (kg)
 
float maxStrength = 100
 Maximum force with which the character can push other bodies (N).
 
float predictiveContactDistance = 0.1f
 How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too high will cause ghost collisions.
 
uint32_t maxCollisionIterations = 5
 Max amount of collision loops.
 
uint32_t maxConstraintIterations = 15
 How often to try stepping in the constraint solving.
 
float minTimeRemaining = 1.0e-4f
 Early out condition: If this much time is left to simulate we are done.
 
float collisionTolerance = 1.0e-3f
 How far we're willing to penetrate geometry.
 
float characterPadding = 0.02f
 How far we try to stay away from the geometry, this ensures that the sweep will hit as little as possible lowering the collision cost and reducing the risk of getting stuck.
 
uint32_t maxNumHits = 256
 Max num hits to collect in order to avoid excess of contact points collection.
 
float hitReductionCosMaxAngle = 0.999f
 Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off.
 
float penetrationRecoverySpeed = 1.0f
 This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in one update.
 

The documentation for this struct was generated from the following file: