playMaker

Author Topic: Trigger issues in Unity 5.2.3f1[SOLVED]  (Read 1786 times)

krysber

  • Playmaker Newbie
  • *
  • Posts: 12
    • View Profile
Trigger issues in Unity 5.2.3f1[SOLVED]
« on: December 07, 2015, 01:09:36 PM »
Unity 5.2.3f1
Playmaker 1.7.8.3

I upgraded to 5.2.3f1 from 5.1.1f1 and am having issues with triggers. My project is in 2D. I have a quad with Box Collider 2D (Is Trigger checked) and Rigidbody2D (Gravity Scale = 0), and I have a quad with Box Collider 2D (Is Trigger checked). The quad without Rigidbody2D moves along with the player sprite. I have a quad that follows the player with a Start state in its FSM that says OnTriggerEnter2D transition to another state that sets an Int variable to 1 and return to Start state. The Start state also says OnTriggerExit2D transition to another state that sets an Int variable to 0 and return to Start state. Nothing happens when these two quads overlap. This worked before upgrading from 5.1.1f1...
« Last Edit: December 11, 2015, 05:37:22 AM by jeanfabre »

Chickan

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Trigger issues in Unity 5.2.3f1
« Reply #1 on: December 08, 2015, 01:22:25 AM »
I don't have an answer but am experiencing a similar issue. This is my first time using Playmaker so I thought I might be doing something wrong.

1. Created a 2D sprite object with a 2d box collider and 2d rigidbody
2. Created a 3D cube, got rid of the box collider and gave it a 2d box collider with trigger ticked. Unticked mesh so it was invisible.
3. Created an FSM on #2 for on trigger enter 2d
4. Also created another 2d sprite, added a box collider with trigger ticked then setup an fsm using on collision enter 2d

Neither of them trigger when the character passes them. They're on the same level and I've tried giving them tags all without success.

Any help would be appreciated

Sorry for tacking onto your question but I thought it was better than starting a new one :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14692
  • Official Playmaker Support
    • View Profile
Re: Trigger issues in Unity 5.2.3f1
« Reply #2 on: December 08, 2015, 03:44:02 AM »
Hi,

 Have you properly set the following:

-- dropped the PlayMaker Unity 2D.prefab in your scene
-- dropped the PlayMakerUnity2DProxy component on both of your objects supposed to collide in 2d?

 Bye,

 Jean

krysber

  • Playmaker Newbie
  • *
  • Posts: 12
    • View Profile
Re: Trigger issues in Unity 5.2.3f1
« Reply #3 on: December 09, 2015, 12:32:39 PM »
Jean,

Actually i had to make sure that both objects had Rigidbody2D. Only my stationary one the player would move onto did. I also check Kinematic. Works now. :)

- Chris