Search Unity

Question How can I disable/enable 2D collider in visual script? (solved)

Discussion in 'Visual Scripting' started by Irgum76, May 16, 2023.

  1. Irgum76

    Irgum76

    Joined:
    Apr 20, 2023
    Posts:
    5
    Hi,

    How can I disable/enable 2D collider in visual script?
     
  2. Z_Kir

    Z_Kir

    Joined:
    Apr 9, 2017
    Posts:
    12
    What do you want to do?
     
  3. Irgum76

    Irgum76

    Joined:
    Apr 20, 2023
    Posts:
    5
    I would like to turn off the collider on my object
    I have a handle what is a trigger
    it's control a nailed trapdoor what lift off and turn 180 degrees after goes down and disappear frome the scene and I destroy it
    but if you hit the handle multiple times with the player befor the trapdoor plays its animation it turns back and kills my player
    if I turn deactive or destroy a whole handle game object then it's disappear what is not a big deal but it dosen't play the animation at all

    so I think the solution is if I deactivete only the handle's collider
    but I can't find this note in visual script
    I find only C# code what is usless to me
     
    Last edited: May 22, 2023
  4. Z_Kir

    Z_Kir

    Joined:
    Apr 9, 2017
    Posts:
    12
    Can you record a video?
     
  5. Irgum76

    Irgum76

    Joined:
    Apr 20, 2023
    Posts:
    5
    Thanks for the helping but I asked a youtuber and he could give me the answer, what is set activate collider boolean so I can turn on and off the collider now
     
    Z_Kir likes this.