Rocket falling through the Floor

I followed the tutorial and then suddenly my Rocket was falling through the floor. I don’t know why. I attached a video showing the falling Rocket if that helps pin down the problem. Here’s a Link to the VIdeo of the Rocket falling: Unity Rocket falling bug - YouTube

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

public class Movement : MonoBehaviour
{
     Rigidbody rb;
    
    // Start is called before the first frame update
    void Start()
    {
       rb = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
        ProcessThrust();
        ProcessRotation();
    }

    void ProcessThrust()
    {
        if (Input.GetKey(KeyCode.Space))
        {
            rb.AddRelativeForce(1, 1, 1);
        }

    }

    void ProcessRotation()
    {
        if (Input.GetKey(KeyCode.A))
        {
            Debug.Log("rotate left");
        }
        else if (Input.GetKey(KeyCode.D))
        {
            Debug.Log("rotate right");
        }
    }

}

Hi FlawDev,

Welcome to our community! :slight_smile:

If the rocket has got a collider attached, it is supposed to be able to collide with other colliders. Make sure the ground has got a collider attached too.


See also:

The Floor has the Box Collider turned on. What else could be the problem?

In your video, I cannot see any collider attached to the Space Shuttle. Maybe I missed it? Only colliders can collide with colliders.

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

Privacy & Terms