Skip to content

Instantly share code, notes, and snippets.

@zephenryus
Last active January 22, 2018 18:45
Show Gist options
  • Save zephenryus/ecf3870b2c1710daea2fe7b53323a8b8 to your computer and use it in GitHub Desktop.
Save zephenryus/ecf3870b2c1710daea2fe7b53323a8b8 to your computer and use it in GitHub Desktop.
  • A character is considered supported if it is less than this distance above its supporting planes.
  • A character should keep falling until it is this distance or less from its supporting planes.
  • Attempt to keep the character at least this distance from the surface.
  • Controls the default dynamic friction for surfaces hit. A value of 0 maintains character momentum. A value of 1 clips all momentum against the normal of the surface hit.
  • If the character's shape is a capsule, then this is used to define the height of a region around its center where we redirect contact point normals. The region extends from above the capsule's upper vertex to below the lower vertex by this height, expressed as a factor of the capsule's radius.
  • The character rigid body mass.
  • The friction of the character rigid body.
  • The mass of the character This value is only used to apply an extra downward force to dynamic rigid bodies that the character is standing on By default this value is which means no additional downward force is applied It should only be set to a positive value if you do not apply gravity from your state machine when the character is on the ground
  • The mass of the character. This value is only used to apply an extra downward force to dynamic rigid bodies that the character is standing on. By default this value is 0, which means no additional downward force is applied. It should only be set to a positive value if you do not apply gravity from your state machine when the character is on the ground.
  • The maximum allowed penetration for this object The default is This is a hint to the engine to see how much CPU the engine should invest to keep this object from penetrating A good choice is of the smallest diameter of the object
  • The maximum allowed penetration for this object. The default is -0.1. This is a hint to the engine to see how much CPU the engine should invest to keep this object from penetrating. A good choice is 5% - 20% of the smallest diameter of the object.
  • The maximum amount that a face can be behind the opposite edge
  • The maximum amount that a face can be behind the opposite edge.
  • The maximum constant force that the character controller can impart onto moving objects By default this is _REAL_MAX ie the character controller is infinitely strong
  • The maximum constant force that the character controller can impart onto moving objects. By default this is HK_REAL_MAX, i.e. the character controller is infinitely strong.
  • The maximum force of character.
  • The maximum linear velocity of the character rigid body.
  • The maximum number of extra planes the user may add to the simplex input during a processConstraints callback
  • The maximum number of extra planes the user may add to the simplex input during a processConstraints callback.
  • The maximum slope that the character can walk up If the character is standing on a slope that is steeper than this checkSupport will return false and an additional vertical plane will be added during integrate that will block the characters movement in the direction of the slope This angle is measured in degrees from the horizontal By default this value is set to PI ie vertical which disables this feature
  • The maximum slope that the character can walk up This angle is measured in radians from the horizontal The default value is pi
  • The maximum slope that the character can walk up. If the character is standing on a slope that is steeper than this, checkSupport will return false, and an additional vertical plane will be added during integrate that will block the character's movement in the direction of the slope. This angle is measured in degrees from the horizontal. By default this value is set to PI / 2, i.e. vertical, which disables this feature.
  • The maximum slope that the character can walk up. This angle is measured in radians from the horizontal. The default value is pi / 3.
  • The maximum speed for the simplex solver.
  • The minimum face normal alignment required when considering connecting a pair of edges
  • The minimum face normal alignment required when considering connecting a pair of edges.
  • The minimum planar alignment required when considering connecting a pair of edges
  • The minimum planar alignment required when considering connecting a pair of edges.
  • The minimum vertical alignment required when considering connecting a pair of edges
  • The minimum vertical alignment required when considering connecting a pair of edges.
  • The number of iterations the character controller will take to resolve an integrate call The character controller will iterate if it hits a surface and needs to change direction to complete the integrate for that timestep The default is iterations
  • The number of iterations the character controller will take to resolve an integrate call. The character controller will iterate if it hits a surface, and needs to change direction to complete the integrate for that timestep. The default is 10 iterations.
  • The orientation difference is scaled by the inverse delta time to compute an angular velocity to be applied to the rigid body The velocity is first clamped to this limit before it is applied
  • The orientation difference is scaled by the inverse delta time to compute an angular velocity to be applied to the rigid body. The velocity is first clamped to this limit before it is applied.
  • The position difference is scaled by the inverse delta time to compute a velocity to be applied to the rigid body The velocity is first clamped to this limit before it is applied
  • The position difference is scaled by the inverse delta time to compute a velocity to be applied to the rigid body. The velocity is first clamped to this limit before it is applied.
  • This flag determines whether the character controller refreshes the manifold when checkSupport is called By default this is set to false ie the manifold is not updated This leads to a small inaccuracy when the character controller is hit by a rapidly accelerating body however it is better to accept this inaccuracy as the extra refresh manifold call can be computationally expensive
  • This flag determines whether the character controller refreshes the manifold when checkSupport is called. By default this is set to false, i.e. the manifold is not updated. This leads to a small inaccuracy when the character controller is hit by a rapidly accelerating body, however it is better to accept this inaccuracy, as the extra refresh manifold call can be computationally expensive.
  • This gain allows for precise matching between keyframes and the current position It works like the m_positionGain it calculates an optimal deltaVelocity scales it by m_snapGain clips it against m_snapMaxXXXVelocity and scales it down if the implied positional difference is larger than m_snapMaxXXXXDistance
  • This gain allows for precise matching between keyframes and the current position. It works like the m_positionGain: it calculates an optimal deltaVelocity, scales it by m_snapGain, clips it against m_snapMaxXXXVelocity and scales it down if the implied positional difference is larger than m_snapMaxXXXXDistance.
  • This gain controls the proportion of the difference in acceleration that is applied to the bodies It dampens the effects of the velocity control
  • This gain controls the proportion of the difference in acceleration that is applied to the bodies. It dampens the effects of the velocity control.
  • This gain controls the proportion of the difference in position that is applied to the bodies It has the most immediate effect High gain values make the controller very stiff Once the controller is too stiff it will tend to overshoot The velocity gain can help control this
  • This gain controls the proportion of the difference in position that is applied to the bodies. It has the most immediate effect. High gain values make the controller very stiff. Once the controller is too stiff it will tend to overshoot. The velocity gain can help control this.
  • This gain controls the proportion of the difference in velocity that is applied to the bodies It dampens the effects of the position control
  • This gain controls the proportion of the difference in velocity that is applied to the bodies. It dampens the effects of the position control.
  • This gain dampens the velocities of the bodies The current velocity of the body is scaled by this parameter on every frame before the controller is applied It is applied every step and is generally more aggressive than standard linear or angular damping A value of means no damping
  • This gain dampens the velocities of the bodies. The current velocity of the body is scaled by this parameter on every frame before the controller is applied. It is applied every step and is generally more aggressive than standard linear or angular damping. A value of 0 means no damping.
  • This parameter blends the desired target for a bone between model space zero or local space one Usually the controller will be much stiffer and more stable when driving to model space However local space targeting can look more natural
  • This parameter blends the desired target for a bone between model space: zero, or local space: one. Usually the controller will be much stiffer and more stable when driving to model space. However local space targeting can look more natural.
  • This parameter is used to determine when a contact point should be considered as part of the character's contact manifold. The default is 0.1f, which means that points .1 above the keep distance will be considered as part of the manifold. This value should be kept at the its default, as changing it from the default value can have undesirable effects.
  • This parameter is used to determine when a contact point should be considered as part of the characters contact manifold The default is f which means that points above the keep distance will be considered as part of the manifold This value should be kept at the its default as changing it from the default value can have undesirable effects
  • This value is used to clip the characters velocity when it is being squeezed by two moving planes When two nearly parallel planes squeeze the character the resultant velocity necessary to move the character so that both planes do not penetrate it can be extremely high which can cause in the character controller to move at a very fast velocity This value defaults to which is appropriate if your default walking speed is If this velocity is exceeded by the character solver when solving parallel planes the solver solves the planes independently The result is that instead of moving at a high velocity the character may penetrate one of the planes based on plane priorities
  • This value is used to clip the characters velocity when it is being squeezed by two moving planes. When two nearly parallel planes squeeze the character, the resultant velocity necessary to move the character so that both planes do not penetrate it can be extremely high, which can cause in the character controller to move at a very fast velocity. This value defaults to 10 which is appropriate if your default walking speed is 10. If this velocity is exceeded by the character solver when solving parallel planes, the solver solves the planes independently. The result is that instead of moving at a high velocity, the character may penetrate one of the planes - based on plane priorities.
  • This value is used when deciding which contact points in the manifold are duplicates Precisely it determines when two contact points are found whether they are to be treated as the same based on the angle between the normals For the default value of contact points with angles less then degrees are considered as identical If you decrease this to contact points with angles less then degrees are considered as identical A larger value will increase the number of contact points considered in the manifold and make for a more accurate simulation at slightly higher computational expense
  • This value is used when deciding which contact points in the manifold are duplicates. Precisely, it determines when two contact points are found, whether they are to be treated as the same based on the angle between the normals. For the default value of 10, contact points with angles less then 2.56 degrees are considered as identical. If you decrease this to 1, contact points with angles less then 8.1 degrees are considered as identical. A larger value will increase the number of contact points considered in the manifold, and make for a more accurate simulation at slightly higher computational expense.
  • When a penetrating plane is added to the manifold we set its velocity so it will push the character away from the point of penetration. This variable controls the speed at which this recovery takes place. The velocity applied is proportional to the penetration distance. This values controls the proportion. By default this value is set to 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment