Search Unity

rigid body not following floor of terrain

Discussion in 'Getting Started' started by Shadowing, Feb 22, 2015.

  1. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Hey guys my 3rd person character isn't following the floor terrain. It just remains walking flat. It moves up when climbing hills though but then that sets a new height for it.
    What things effects this.
    shouldn't gravity be keeping me hugged to the ground?



    Maybe it has something to do with my player movement script
    The 0f
    Code (csharp):
    1.  
    2. void Move (float h, float v){ // move player in direction
    3. movement.Set (h,0f,v);
    4. movement = movement.normalized * speed * Time.deltaTime;
    5. playerRigidbody.MovePosition (transform.position + movement);
    6. }
    7.  
     
    Last edited: Feb 22, 2015
  2. Drelok

    Drelok

    Joined:
    Oct 28, 2014
    Posts:
    2
    Doesn't Mass and Drag get calculated in gravity? Try changing drag to .5?

    * ah infinity is the opposite of what I was thinking...

    What are the settings in Edit > Project Settings > Physics?
     
    Last edited: Feb 23, 2015
  3. Drelok

    Drelok

    Joined:
    Oct 28, 2014
    Posts:
    2