playMaker

Author Topic: Make a game object trigger a event[SOLVED]  (Read 3914 times)

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Make a game object trigger a event[SOLVED]
« on: August 10, 2014, 03:50:40 AM »
I have a game object set up to move to one direction. When I have it collide with a object that has a trigger set up it doesn't react, but when I use a first person controller prefab it does. Why does it do that?
« Last Edit: August 14, 2014, 02:03:51 PM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Make a game object trigger a event
« Reply #1 on: August 11, 2014, 10:58:07 AM »
Does you GameObject have a collider?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Make a game object trigger a event
« Reply #2 on: August 11, 2014, 07:56:27 PM »
Does you GameObject have a collider?

Yes, with is Trigger turned on. Plus, did the same thing with the 3rd Person Controller prefab.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Make a game object trigger a event
« Reply #3 on: August 11, 2014, 08:02:05 PM »
The only thing that should be marked as a trigger is the actual trigger zone itself, the other colliders should just act as normal colliders.

Have you checked this video out?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Make a game object trigger a event
« Reply #4 on: August 11, 2014, 08:42:41 PM »
The only thing that should be marked as a trigger is the actual trigger zone itself, the other colliders should just act as normal colliders.

Have you checked this video out?

The same video where the actual boxed trigger isn't tagged? This is what I don't understand, whether the clear box trigger is tagged or not, I still get the same results.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Make a game object trigger a event
« Reply #5 on: August 11, 2014, 08:51:21 PM »
Do you have some unique tagging setup on your objects?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Make a game object trigger a event
« Reply #6 on: August 11, 2014, 08:56:16 PM »
None, except the trigger.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Make a game object trigger a event
« Reply #7 on: August 11, 2014, 09:01:32 PM »
If the GameObject is not marked as a trigger, and the trigger zone is marked as a trigger, and there are no custom tag filters defined in the trigger action then it should work.

Can you post a repro scene?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Make a game object trigger a event
« Reply #8 on: August 12, 2014, 12:44:19 AM »
If the GameObject is not marked as a trigger, and the trigger zone is marked as a trigger, and there are no custom tag filters defined in the trigger action then it should work.

Can you post a repro scene?

This is what I have for the main FSMs. And the mouse pic object just has a mouse pick action.

https://db.tt/Ca9WZG9J

https://db.tt/ifdPOCb3

https://db.tt/ZUPqiFnU

https://db.tt/rZ71RiuQ

https://db.tt/8aoRawP0

https://db.tt/gTzdnDCC

https://db.tt/F8cyxIUp
« Last Edit: August 12, 2014, 12:47:09 AM by coffeeANDsoda »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Make a game object trigger a event
« Reply #9 on: August 12, 2014, 06:57:06 AM »
Can you post the scene?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Make a game object trigger a event
« Reply #10 on: August 12, 2014, 04:52:13 PM »
Can you post the scene?

Does this work on your end?

https://db.tt/4zAYzyt6

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Make a game object trigger a event
« Reply #11 on: August 12, 2014, 06:35:41 PM »
Try adding a rigidbody to the object you want the trigger to detect. You can turn the gravity off (and even turn off the rotations so that it won't turn and tumble if hit by another object.) but as best as I can tell by reading this page (http://docs.unity3d.com/Manual/CollidersOverview.html) since a trigger is a physics component, it needs to have something that links it up to the physics systems.

Without the components that tell the engine that it's a physics thing, it's likey that it simply doesn't know how to deal with it when it interacts with the physics things.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Make a game object trigger a event
« Reply #12 on: August 13, 2014, 10:13:18 PM »
Added a rigidbody, works now. Thanks.