CharacterController::GetGroundContact
Defined in:
Returns a contact with the ground.
C4Character.h
Prototype
const CollisionContact *GetGroundContact(void) const;
Description
The GetGroundContact
function returns a pointer to a collision contact with the ground, if such a contact exists. Whether a character is in contact with the ground is determined by searching for any contact for which the dot product between the surface normal and the up direction is greater than the minimum ground cosine. The first contact found that satisfies this condition is returned. If no ground contact is found, then the return value is nullptr
.The minimum ground cosine can be changed using the
CharacterController::SetGroundCosine
function. The default value is 0.6875. The up direction is always (0,0,1) in world space.
See Also