Skip to main content
Discovery icon for Retro Dev Discord server

Retro Dev

5,152 Online
44,244 Members
# retro-chat3 people

ground check logic

Players discuss methods for implementing ground checks in game development, specifically comparing simple boolean checks with more complex raycasting and hitbox solutions.

  • A basic ground check can be a simple true/false value, indicating if the character is touching the ground.
  • Using a raycast's normal vector with a dot product and ray direction allows checking the slope angle to determine if the ground is too steep.
  • A longer ground check ray can be an "evil fix" option for ground detection issues.
  • Relying on "part touched" solutions is generally discouraged as they don't work well; multiple raycasts are suggested as a better option for accurately detecting if a surface is above or below the object.
  • A hitbox encompassing the entire object could be used to check for ground contact, setting the object's state to "Standing" rather than "Falling," but this might have issues with ceilings.
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App