Skip to content

v2.0.0

Latest

Choose a tag to compare

@Zode Zode released this 12 Sep 18:12
· 1 commit to main since this release
c8ef835

Breaking changes:

  • Due to PhysX, kinematic characters are no longer considered RigidBody actors: instead they spawn a static collider for KCC calculations, and rigidbody child with a child collider for everything else. This should not affect physics, but you do have to adjust your triggers (collider.Parent is no longer the KCC actor, it is now collider.Parent.Parent). This however does mean that characters can no longer magically phase into each other.
  • Kinematic characters no longer pass orientation through the interface event, instead you can use SetOrientation during KinematicMoveUpdate.
  • KinematicCollision event now ref:s the raytrace so that user scripts can modify it if need be
  • KinematicCollisionValid now uses PhysicsColliderActor instead of Collider so that Terrains and such can be filtered.
  • KinematicGroundingEvent now passes GroundFlags.
  • RayCastHits are no longer passed as nullable.
  • Kinematic character collider sizes are now uniform, instead of capsule being noticeably larger than the box.
  • UnstuckSolve now reports overlaps and solved overlaps.
  • KCC traces now have a PhysicsFlag enum in place of the booleans.

New features:

  • Kinematic characters now have a SlideSkipMultiplierWhileAirborne property, which toggles if the character should skip slide multiplier during airborne movement.
  • the KCC Debugger (requires compiling with KCC_DEBUGGER define), KCC no longer relies on Flax's debug displays. The option to show/hide debugs has been removed.
  • Kinematic characters now have ColliderTop and ColliderTopVector properties.
  • Unstucking now has a "unstuck rescue" feature, which is used if the ComputePenetration/SolveUnstuck completely fails. Kinematic characters now have UnstuckRescueMode, UnstuckRescueDistance, MaxUnstuckRescueDistance properties.
  • Kinematic characters now have MinimumCreaseAngle property, which can be used to set the minimum angle required for crease handling to trigger.
  • SolveUnstuck now handles MeshColliders with a custom routine, kinematic characters now have TriangleMeshUnstuckMode property.
  • CastCollider variant that returns the whole array, not just the "top result".
  • add CastLine with KCC filtering to kinematic characters.
  • Exposed some functions for kinematic characters.
  • Partial ground detection, kinematic characters now have PartialGroundNormal property and PartialGroundTangent function. They also now have PartialGroundSolveMode property.
  • Kinematic characters now have HasSolidBelow property, which indicates if any solid is below the character. IsGrounded still exists but requires the proper GroundFlags to return true.

Other changes:

  • In general kinematic characters are less likely to get stuck, due to unstuck behavior adjustments.
  • Horizontal pushes caused by movers are now somewhat more stable.
  • Various micro optimizations.
  • KCC no longer interpolates by default.
  • Character <-> character interactions are now more solid.
  • Add rounding to select few spots to avoid jittering and jiggling.
  • Change Math to MathR where possible (which in turn either resolves to Math or MathF).
  • UnstuckSolve's push vector now accounts for itself, resulting in more accurate outcome.
  • Kinematic characters no longer have a separate ColliderContactOffset property, instead the KinematicContactOffset property is used.
  • GroundCheck and SnapToGround now internally share the same trace increasing performance. Variant of the SnapToGround has been introduced so that it can be used without existing trace.
  • KCC no longer tries to stair step on third sliding plane iteration (there are no degrees of freedom left), increasing performance.
  • Kinematic characters now snap to ground properly.
  • Acute corners are now handled better.
  • Inflation maths are now correct.
  • More profiler events
  • Json settings assets are no longer polluted by KCC.
  • Null checks for Flax objects are now using the overloadable equals operator.
  • Interpolation is now fixed, and is done during Scripting.Draw instead of Update/LateUpdate. Setting for selecting when the interpolation happens has been removed.
  • Refactor "velocity" to "movement" inside KCC to lessen confusion.
  • Cleant up various bits of code and comments.
  • Possibly some other changes that I forgot.

Additionally: KCCExample project now has crouching to showcase how you can use the character's cast function in your code.