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

How to use isTrigger to move different objects

Discussion in 'Physics' started by Clik_Mazer, Sep 13, 2020.

  1. Clik_Mazer

    Clik_Mazer

    Joined:
    Apr 19, 2019
    Posts:
    4
    Hello,

    I am trying to make a simple cube with box collider as isTrigger. I have searched endless amount of youtube videos and online forums and cannot find a simple example or way of doing this. I made a cube with istrigger, and want that to when passed through by player, make another platform play an animation. I am new but learning about Unity and scripting very quickly. If anyone could help me, that would be greatly appreciated. If you need more details, please let me know.

    Just to confirm what I am looking for, player enters a isTrigger cube, on a platform, and to move another platform from across the map to me. I made the animation already and just need to call it from OnTriggerEnter and to define what I want moved.

    Thanks
     
  2. jbnlwilliams1

    jbnlwilliams1

    Joined:
    May 21, 2019
    Posts:
    267
    Does the player have a collider attached. You need to have a collider on both objects.
     
  3. Clik_Mazer

    Clik_Mazer

    Joined:
    Apr 19, 2019
    Posts:
    4
    Yes. My problem is I know how to enter a box collider and do something to my player. But I want to do something like call an animation or move position of another object when entering a collider. How do I call a collider that is not the one I am as player?