Instead of raycast, why don't we try boxcast 2d? This will let Mario know that he is still touching the ground regardless that there is a small gap between the two platforms.
Discord: / discord
Twitch: / the_phantom3
*Unity Manual References*
Boxcast: https://docs.unity3d.com/ScriptRefere...
CircleCast: https://docs.unity3d.com/ScriptRefere...
CapsuleCast: https://docs.unity3d.com/ScriptRefere...
See Boxcast with gizmo (done in 3D):
https://docs.unity3d.com/ScriptRefere...
*Disclaimer: The characters and music involved in this level do not belong to me. All of them belong to their respectful owner(s). Usually Nintendo.
#UnityTutorial #Unity2D #GameDesign #Platformer #GameDev #Programming #GameMechanic