Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MlleBun on March 04, 2021, 02:51:45 PM

Title: [Playmaker 1.9.1.p3] No event is sent on an OnTriggerEnter action
Post by: MlleBun on March 04, 2021, 02:51:45 PM
Hi,

I could use some help understanding why my OnTriggerEnter state is not validated when the player enters the triggerzone yet. What's weird is that I previously used this same structure on a previous project and it worked perfectly then. The only difference is that I downloaded the Cinemachine addon from Ecosystem and I'm using the GetPriority action in the FMS instead of a basi SetProperty action.

Player

Triggerzone


Attachement
PM_Trigger5 - The state where the FSM gets stuck even if the player has entered the triggerzone.


I also tried onTriggerStay, but it's the same.

Thanks for any help!
Title: Re: [Playmaker 1.9.1.p3] No event is sent on an OnTriggerEnter action
Post by: Alex Chouls on March 07, 2021, 01:11:47 AM
It's hard to say what's wrong from the screenshots.

You could try using Physics Debug Visualization: https://docs.unity3d.com/Manual/PhysicsDebugVisualization.html

To double check that all the triggers/colliders/rigidbodies are setup properly.

You could also try making the simpler TriggerOnEnter/TriggerOnExit loop in this scene to check that works before adding states.
Title: Re: [Playmaker 1.9.1.p3] No event is sent on an OnTriggerEnter action
Post by: djaydino on March 08, 2021, 06:13:44 AM
Hi.
I always use a separate fsm with 2 states (trigger stay and trigger exit)
and set a bool (in Trigger)

Then i use 'Fsm Bool Test' ([url = https://hutonggames.fogbugz.com/default.asp?W1181]Ecosystem[/url]) on other fsms to do its logic especially if there is some delay between those state (for example a wait, some tweens, etc.)

The main reason is because if the trigger is exited before the trigger exit state is active, it will not trigger as a trigger exit anymore.
But its also easier to debug.

double check layers also (project settings)
Also make sure you need 2d or 3d as the use different trigger event actions.