I’ve got a player with a rigidbody/capsule collier (gravity enabled) and a plane with a box collider. When the player is on the plane, everything works as expected, the player can walk across the plane with no issue. However, when the player walks off the plane, I want the player to fall. However, what happens instead is that the capsule collider falls but the player just keeps walking in thin air. Why is this happening?
Collider Setup
GIF
http://giphy.com/gifs/l2JhnSgk8ySJ4Ox3O
My code for the player:
public class PlayerMove : MonoBehaviour {
float i = 0;
void Start () {
}
void Update () {
i = 0.1f;
transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + i);
}
}
