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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

i have problem OnTriggerStay2D, it don't call Frequently and i don't know why , someone help me????

Discussion in '2D' started by fire1991man, May 8, 2015.

  1. fire1991man

    fire1991man

    Joined:
    May 31, 2013
    Posts:
    18
    i have 2 cell object like pic 1. i attact FallScript like pic 2. when it colision i see log like below:

    _allowFall: True
    OnTriggerEnter2D
    _allowFall: True
    OnTriggerStay2D
    _allowFall: False
    OnTriggerStay2D
    _allowFall: False
    OnTriggerStay2D
    _allowFall: False
    OnTriggerStay2D
    _allowFall: False
    OnTriggerStay2D
    _allowFall: False
    then ..
    _allowFall: False
    _allowFall: False
    _allowFall: False
    _allowFall: False
    _allowFall: False
    _allowFall: False
    _allowFall: False

    I don'tt know OnTriggerStay2D don't call more. can Someone help me???
     

    Attached Files:

  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,996
    Maybe the Rigidbody2D goes to sleep.
    Try other sleeping modes.

    Or why do you need to have OnTriggerStay2D() called more times?
     
  3. fire1991man

    fire1991man

    Joined:
    May 31, 2013
    Posts:
    18
    thx you , i want to test some function in unity . i change spleeping modes to never sleep and it call frequently. thx you so much