Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: santelia on July 12, 2012, 11:34:27 AM
-
I'm facing a problem.
I need to detect a trigger enter where the owner of the trigger (a boat with a trigger sphere collider and some usual mesh colliders) has no rigidbody. The goal is to detect enemies, that too have no rigidbody and have an enemy layer and an enemy tag. It might be the easiest task of the universe, but it doesn works. When an enemy object enters the trigger, simply the start state doesn't passes the "TRIGGER ENTER" event to the second state.
Any idea?
(http://img804.imageshack.us/img804/148/pmscreenshot01.png)
-
Searching into Unity Answers, it appears that onTrigger call is launched only when an active rigidbody enters a listening collider. E. g. see http://answers.unity3d.com/questions/223493/performance-trigger-on-objects-or-on-player.html (http://answers.unity3d.com/questions/223493/performance-trigger-on-objects-or-on-player.html).
But in some cases rigidbodies bring problems to certain game processes, and for my experience they can give you heavy headaches when dealing with water... ;D
Any help for my need of triggering?
-
UPDATE: added rigidbody to a couple of enemy tagged and layered objects, but nothing differrent happens...
>:(
-
Hi,
what's in your trigger state?
"TRIGGER ENTER" is a built in event right, you haven't created that event. put trigger enter as a global transition of the state "raycast" and see if it improves.
else, add a rigidbody set to iskinematic to the routine radar. check if that helps.
bye,
Jean
-
As soon as I'll have finished my giant icecream ;) , I'll try to make it.
-
So, these are the results:
Adding a global "TRIGGER ENTER" transition to the state "raycast" doesn't reach any result.
Generally, it seems that the TRIGGER ENTER system event doesn't works at all for this RTS. Strange behaviour, since in my RPG project I use it for a hundred triggers - activated by PLAYER with character controller (all it's WOW system) - and it works perfectly. Imhave to believe that it worsk ONLY with character controllers.
So, adding a rigidbody both to the routine radar and to the enemies, and sending a custom event and NOT the system one, everythin works fine.
Again, strange behavior... ???