playMaker

Author Topic: Trigger Event Exit not working after object disabled  (Read 2006 times)

Evaldas

  • Playmaker Newbie
  • *
  • Posts: 21
Trigger Event Exit not working after object disabled
« on: April 16, 2021, 05:57:41 PM »
Hello! I'm having this interesting situation - Trigger event on regular enter and exit is working just fine, but if Game Object get's deactivated while in the trigger, the trigger exit event doesn't get called.

Maybe somebody knows how to approach this? :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Trigger Event Exit not working after object disabled
« Reply #1 on: April 17, 2021, 04:01:14 PM »
Hi.
I have encountered this issue a well.

I my case i have a separate collider which never gets disabled.

when our player rolls he cant get hit and i disable his body trigger, which caused the issue.

Its a unity 'flaw'

You could for example do a Trigger Event 'Stay' and on hit do a short delay then go back and do trigger event again.

or for example use box cast

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Trigger Event Exit not working after object disabled
« Reply #2 on: April 18, 2021, 11:39:26 AM »
Depending on your setup, you could use the DISABLE system event, sent when a GameObject is disabled. For example, if you want to do the same thing on Trigger Exit or GameObject disabled.