My player fall through terrain hills when i'm sprinting
Hello I'm new in Unity,
I have this issue, when I'm sprinting with my player (If i press Shift, my player run), it fall through hill terrain
Look the IMG:
Someone who can help me please? Thank you..
This is my movement code:
float orizzontale = Input.GetAxis ("Horizontal") * velocita;
transform.Translate (Vector3.right * orizzontale);
float avanti = Input.GetAxis ("Vertical") * velocita;
transform.Translate (Vector3.forward * avanti);
and I use the mouse look script
Answer by getyour411 · Sep 22, 2015 at 03:41 AM
There are many duplicate posts on this. Using transform.translate is like a mini teleport per execution has no physics/colliders, so yes you are teleporting through the slope/terrain then falling. Use a character controller, physics, raycasting (I suppose), etc.
Oh lol, I didn't know because i'm new in this engine and I'm making a game for school homework without knowing C# or Js
Your answer
Follow this Question
Related Questions
Falling through floor - but this is weird 0 Answers
Falling Through Floor after a certain number of Triggers... 0 Answers
My character is falling throug the floor 1 Answer
Character falls through the floor 1 Answer
player trigger ball falls 1 Answer