playMaker

Author Topic: How to access specific 2D colliders.  (Read 2087 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
How to access specific 2D colliders.
« on: May 22, 2015, 02:26:28 PM »
Basically, this is the issue I have.

I have a Gameobject with 2 2D Colliders, a Box and a Circle. I need to Enable/Disable Triggers on specific individual Colliders to make something in particular work, but I can only access Collider.2D---> Enable Trigger through the Set Property action. This method only enables and disables my first collider, how would I be able to Access this particular function for the Circle Collider 2D and the Box collider 2D separately?

Thanks in advance

Tedthebug

  • Playmaker Newbie
  • *
  • Posts: 21
Re: How to access specific 2D colliders.
« Reply #1 on: May 23, 2015, 05:10:05 AM »
Could you put one collider on an empty game object that is parented to & centred on the sprite?  That way the game object could have its own name & tag so you can identify it.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
« Last Edit: May 23, 2015, 08:50:59 AM by dudebxl »

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: How to access specific 2D colliders.
« Reply #3 on: May 25, 2015, 10:39:01 AM »
Thanks for both the suggestions,

Actually I had forgotten the Enable Behaviour action was available,
I was able to use this as a solution.

Many thanks for taking the time to help me out :)