Dropper falling through plane - Obstacle course

Hi,

I am currently doing the Obstacle Course and I am at the point “caching a reference” where the object called “Dropper” should fall from the “sky” to the plane after 5 seconds are over.
Everything is working and the dropper also falls.
BUT it is falling through my plane :frowning:


My dropper Inspector:

My plane Inspector:

I have no idea why this is happening because I think that I followed all steps in course :(.

Thanks !
Jan

Your dropper is marked as trigger. Trigger Collider don’t get stopped on collision and don’t recieve forces from other colliders, they only raise collision events. Remove the “is trigger” on your dropper.

Hi,

You are right. I tested several properties all with the result that the object falls through the plane.
I deactivated the trigger but it’s still falling through the plane :frowning:


What is the disabled box collider on your plane for?
How is the dropper moved? Is it moved by the rigibody and gravity or are you moving it with the script?

The box collider was just for a test if the dropper then does not fall through. When I enable it the dropper does not fall through it but thr plane itself moves then …

The Dropper has a rigidbody:
grafik
But it is moved by the “Dropper” script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Dropper : MonoBehaviour
{
    MeshRenderer renderer;
    Rigidbody ridigbody;
    [SerializeField] float timeToWait = 5f;


    void Start()
    {
        renderer =  GetComponent<MeshRenderer>();
        ridigbody = GetComponent<Rigidbody>();
        renderer.enabled= false;
        ridigbody.useGravity = false;
    }

    // Update is called once per frame
    void Update()
    {
        if(Time.time > timeToWait)
        {
            Debug.Log(timeToWait + " seconds elapsed");
             renderer.enabled= true;
             ridigbody.useGravity = true;
        }
        //Debug.Log(Time.time);
    }
}

1 Like

First of all, why has the plane a rigidbody at all? I assume the plane is the floor and shouldn’t move. So remove the rigidbody from the plane, or set it as kinematic, so it can’t be push around by other objects.

Try setting the mesh collider on the plane to convex.

Oh! I removed the rigidbody from the Plane and now the dropper does not fall through the plane anymore.
Sorry I am new to all this and it seems like this solves my issue.

Thanks so much!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms