Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: lioncirth on August 02, 2013, 09:24:47 AM

Title: [SOLVED] On Trigger Issue
Post by: lioncirth on August 02, 2013, 09:24:47 AM
Hi

I seem to be having an issue with on trigger and cannot get it to work.

I have a large number of collectables in the scene, each has their own collider - when the player hits them, the player picks them up. (This works fine)

As I am targeting iOS, I want to reduce the amount of colliders in the scene.

I therefore thought it would be better to have a collider on the player and none on the collectables.

I have it set up so that the player has a collider on it, when the box collider hits an item tagged "Gem" it will send an event (which is attached to that gem)

The issue is for some reason the on trigger event doesnt seem to collide with the collectable and im not sure why...

1) the trigger on the player is set to "is trigger"
2) I have created the tag and assigned it to one of the children of the collectable as this is where the mesh is
3) added the "Gem" tag in the on trigger event

It works if I leave everything untagged...

Any help would be great!

Thanks
Title: Re: On Trigger Issue
Post by: jeanfabre on August 02, 2013, 09:26:42 AM
Hi,

 Both objects MUST have a collider for collisions and/or triggers to work. If you remove the collider component, it becomes totally invisible to the collision system.

bye,

Jean
Title: Re: On Trigger Issue
Post by: lioncirth on August 02, 2013, 09:28:46 AM
Ah I see thanks!

Reducing colliders in the collectables wont work then hehe :)