playMaker

Author Topic: Trigger enter not working! Help!  (Read 20408 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Trigger enter not working! Help![SOLVED]
« Reply #15 on: September 05, 2013, 10:16:22 PM »
Just noticed that Trigger Event and Get Trigger Info are both under the Physics category. Trigger Event only works with objects that have rigidbodies, I'm assuming Get Trigger Info is the same.. Correct?

Are your object using rigidbodies?
« Last Edit: October 28, 2013, 08:39:08 AM by jeanfabre »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ryf9059

  • Full Member
  • ***
  • Posts: 100
Re: Trigger enter not working! Help!
« Reply #16 on: September 08, 2013, 03:49:16 PM »
Just noticed that Trigger Event and Get Trigger Info are both under the Physics category. Trigger Event only works with objects that have rigidbodies, I'm assuming Get Trigger Info is the same.. Correct?

Are your object using rigidbodies?

I do use rigidbodies, and I have found the problem so we are good now :) But I do have another problem with something you said earlier tho.

You said something about use FSM on bullet itself, quote:

"The reason I suggest looking at putting the fsm on the bullet is because if more than one bullet hit the enemy at the same time then the enemy can only process one and will likely miss the other(s). If the bullet controls this then you can use them grab the collider(enemy) and reduce the health variable remotely meaning all collisions should technically register but it may affect performance by having an FSM on every bullet."

I plan to do this as well, but if those things happens simultaneously, will the enemy be able to handle all the collision event at the same time? I thought one FSM can only be at one state at a time. So by doing your way the enemy is not even aware of what hits him right? He's health just get drained remotely.


The reason I came up with this is because of another thread: http://hutonggames.com/playmakerforum/index.php?topic=4177.0

which suggests using global event and hard coded fsm naming convention. If the WEAPON / APPLY DAMAGE are simultaneously triggered, the enemy will not be able to handle then all at once right? I've indecisive between these two approach.
« Last Edit: September 08, 2013, 03:52:18 PM by ryf9059 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger enter not working! Help!
« Reply #17 on: September 11, 2013, 03:00:56 AM »
Hi,

 It seems you are trying to do what TargetPro is exactly solving. Have you checked it out?

 As for your concern about not missing bullets. If your logic is synchronous and only about decreasing a local variable, you can pretty safe on the collision detection to trigger Fsm reliably ( and them fsm to process properly too). If you have a lot of states and work on each collision then yes, move the logic in the bullets themselves. It will be safer.

 
 bye,

 Jean

FelixofMars

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Trigger enter not working! Help!
« Reply #18 on: October 28, 2013, 06:09:54 AM »
I'm not convinced this is working, I have a JavaScript to trigger some events and that works fine. I am switching over to playmaker but using triggers doesn't seem to work. I set it up the way it should work and even been through one of the videos
The object is marked as a trigger I have triple checked. The thing just never activates.

Using Unity 4.2.2f1 and latest PlayMaker.

My workaround used the JavaScript to test the trigger then Get Property to get the bool from that and pass it between scripts.
« Last Edit: October 28, 2013, 10:01:05 AM by FelixofMars »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger enter not working! Help!
« Reply #19 on: October 29, 2013, 03:15:11 AM »
Hi,

Are you sure you have setup properly your gameobject? does it has a rigidbody component?

bye,

 Jean

FelixofMars

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Trigger enter not working! Help!
« Reply #20 on: November 02, 2013, 08:09:56 AM »
Does it only work with RigidBody? That may explain it. Well it works for me if in a around about way.

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Trigger enter not working! Help!
« Reply #21 on: November 03, 2013, 03:56:10 PM »
Sometimes I have triggers set up and everything should work properly, but doesn't.

When this happens, I add a rigidbody to the trigger.

I'm not sure why this works for me sometimes, but it usually fixes it. You also might not be able to add a rigidbody to your trigger, if it affects any physics.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger enter not working! Help!
« Reply #22 on: November 04, 2013, 12:29:58 AM »
Hi,

 Simply set your rigidbody to "Is kinematic" when that's the case.

bye,

 Jean