Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

3d Bomb for Plane

Discussion in 'Scripting' started by MilchBrocken, Feb 8, 2021.

  1. MilchBrocken

    MilchBrocken

    Joined:
    Nov 5, 2019
    Posts:
    33
    Hi there,

    so I've got a Plane and a Bomb. I want that the Bomb is falling down when I want it. Like if I press B the Bomb should fall. But I want no Instatiate cause I hate it. And OnCollisionEnter or OnTriggerEnter does work but as soon as I start the game it will explode. I hope you can help me

    Milch
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    There's no reason to hate Instantiate, you'll need to use it.

    As for the collision/trigger issue, have the bomb check if the object it's colliding with is the plane that dropped it, and ignore the collision if it is.
     
  3. MilchBrocken

    MilchBrocken

    Joined:
    Nov 5, 2019
    Posts:
    33
    Okay so I don't want to use Instantiate cuz I don't like it. It's not "natural" for me
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,762
    That's fine. It's natural for Unity. In fact, NOTHING gets into your scene without first passing through Instantiate. True story, not an exaggeration.

    Well then that's not working, is it? But we know those functions work, so review the docs, review the example code, try out a few tutorials, get it working.

    It's always best when trying something new not to mindlessly slam your brain shut on something the entire game engine is built upon, and then declare that an entire Physics and collision subsystem in use all around the world doesn't work. That's not engineering.

    Good luck!