Example #1
0
 // Constructor
 // openCharacterController: The character controller that hit.
 // hitInfo: The hit info.
 // directionMoved: Direction moved when collision occured.
 // distanceMoved: How far the character has travelled until it hit the collider.
 public CollisionInfo(CharacterController2k openCharacterController,
                      RaycastHit hitInfo,
                      Vector3 directionMoved,
                      float distanceMoved)
 {
     collider      = hitInfo.collider;
     controller    = openCharacterController;
     gameObject    = hitInfo.collider.gameObject;
     moveDirection = directionMoved;
     moveLength    = distanceMoved;
     normal        = hitInfo.normal;
     point         = hitInfo.point;
     rigidbody     = hitInfo.rigidbody;
     transform     = hitInfo.transform;
 }