Hi, i’m new to Unity and i would ask information about raycast and spherecast.
I have a character with a capsule collider, first i applied a raycast to know if the character hits the ground but i have encountered problem with edges of solid (The character was stuck in air when he was between empty space and surface).
So i thought about applied a spherecast for more precision but i don’t know why
Physics.Raycast(transform.position + (Vector3.up * 0.1f), Vector3.down, out hitInfo, m_GroundCheckDistance + 0.1f)
is not equivalent to
Physics.SphereCast (transform.position + sphereRayon * Vector3.up, sphereRayon, Vector3.forward, out hitInfo, m_GroundCheckDistance)
(sphereRayon is radius of capsule collider)
?
Thanks for the replies