using UnityEngine;
namespace MenteBacata.ScivoloCharacterController
{
public struct GroundInfo
{
///
/// Ground point considered in contact with the capsule bottom hemisphere.
///
public readonly Vector3 point;
///
/// Ground normal, it accounts for steps by returning the normal of the upper floor.
///
public readonly Vector3 normal;
///
/// Normal of the plane tangent to the ground and to the capsule bottom hemisphere at the contact point.
///
public readonly Vector3 tangentNormal;
///
/// Ground collider.
///
public readonly Collider collider;
///
/// True if the character should be considered on floor on this ground, false otherwise.
///
public readonly bool isOnFloor;
public GroundInfo(Vector3 point, Vector3 normal, Vector3 tangentNormal, Collider collider, bool isOnFloor)
{
this.point = point;
this.normal = normal;
this.tangentNormal = tangentNormal;
this.collider = collider;
this.isOnFloor = isOnFloor;
}
}
}