So basically I created a simple 3d scene in unity but my "character" keeps falling through objects or pass through them and i tried every type of collider(mesh,box,terrain) even tried adding a rigidbody component to each thing but it didnt do the trick
Here is My code for making the "character" move
public class PlayerMovement : MonoBehaviour
{
//
public CharacterController controller;
public float speed = 12f;
public float gravity = -19.8f;
public float jumpHeight = 3f;
public Transform groundCheck;
public float groundDistance = 0.4f;
public LayerMask groundMask;
Vector3 velocity;
bool isGrounded;
// Update is called once per frame
void Update()
{
isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
if(isGrounded && velocity.y < 0)
{
velocity.y = 0f;
}
float x = Input.GetAxis("Horizontal");
float z = Input.GetAxis("Vertical");
Vector3 move = transform.right * x + transform.forward * z;
controller.Move(move * speed * Time.deltaTime);
velocity.y += gravity * Time.deltaTime;
controller.Move(velocity * Time.deltaTime);
if(Input.GetKey(KeyCode.LeftShift))
{
speed = 24;
}
else
{
speed = 12;
}
if(Input.GetButtonDown("Jump") && isGrounded)
{
velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity);
}
}
}

IsTrigger? And have you checked the Physics settings -> Layer Collision Matrix ? maybe your layers ignore each other? - derHugo