using System.Collections; using System.Collections.Generic; using UnityEngine; namespace KinematicCharacterController { public interface ICharacterController { /// /// This is called when the motor wants to know what its rotation should be right now /// void UpdateRotation(ref Quaternion currentRotation, float deltaTime); /// /// This is called when the motor wants to know what its velocity should be right now /// void UpdateVelocity(ref Vector3 currentVelocity, float deltaTime); /// /// This is called before the motor does anything /// void BeforeCharacterUpdate(float deltaTime); /// /// This is called after the motor has finished its ground probing, but before PhysicsMover/Velocity/etc.... handling /// void PostGroundingUpdate(float deltaTime); /// /// This is called after the motor has finished everything in its update /// void AfterCharacterUpdate(float deltaTime); /// /// This is called after when the motor wants to know if the collider can be collided with (or if we just go through it) /// bool IsColliderValidForCollisions(Collider coll); /// /// This is called when the motor's ground probing detects a ground hit /// void OnGroundHit(Collider hitCollider, Vector3 hitNormal, Vector3 hitPoint, ref HitStabilityReport hitStabilityReport); /// /// This is called when the motor's movement logic detects a hit /// void OnMovementHit(Collider hitCollider, Vector3 hitNormal, Vector3 hitPoint, ref HitStabilityReport hitStabilityReport); /// /// This is called after every move hit, to give you an opportunity to modify the HitStabilityReport to your liking /// void ProcessHitStabilityReport(Collider hitCollider, Vector3 hitNormal, Vector3 hitPoint, Vector3 atCharacterPosition, Quaternion atCharacterRotation, ref HitStabilityReport hitStabilityReport); /// /// This is called when the character detects discrete collisions (collisions that don't result from the motor's capsuleCasts when moving) /// void OnDiscreteCollisionDetected(Collider hitCollider); } }