Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.


Discussion in 'Physics for ECS' started by shotoutgames, Sep 19, 2020.

  1. shotoutgames


    Dec 29, 2013
    Any simple solution.
    I use a raycast currently to check if player touches ground when he lands from a jump but sometimes it misses the check and end up through the grounds physicsShape instead. I want to be able to check when that happens so have the player popup over it.
    I see something like that in the samples but a little complex for me :(
  2. petarmHavok


    Nov 20, 2018
    Why does it miss the check? If there's ground below raycast will always hit. Now the problem might be that you are shooting the ray when still in mid air, so you decide it's not at the ground yet, but in the next step it's already penetrating, so you need to recover from penetration. What is your character? Is it a normal rigid body, or something you are simulating on your own? Have you checked the character controller in the samples?
    steveeHavok likes this.