playMaker

Author Topic: [SOLVED] Turn off collider?  (Read 4222 times)

ShazBang

  • Playmaker Newbie
  • *
  • Posts: 33
[SOLVED] Turn off collider?
« on: May 11, 2016, 08:34:14 AM »
Having some trouble at the moment, an object needs to be able to pass through other triggers without triggering them while it goes back to its start position, is there an action that would allow me to turn off an objects collider until it reaches its starting position, where it would then turn back on?

Just having trouble finding the right way to do it.

Thanks.  :D
« Last Edit: May 12, 2016, 04:03:14 AM by ShazBang »

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Turn off collider?
« Reply #1 on: May 11, 2016, 09:24:01 AM »
Hi dude,

What you are after is enabling and disabling the collider.
You can try using the set and get property actions in playmaker if you can't find any that works for you.

Simply drag and drop the box collider into the variable slot in the playmaker action and your good to go. All you would have to do then is to turn it back on when you reach your destination.

You might have the problem though of the gameobject falling through the floor if it has a rigid body. If thats the case, try turning on is kinematic in the rigidbody component and leaving the collider part alone. Then turning is kinematic off when you get to your destination. There is a playmaker action you can use to toggle its on/off state.

If you get stuck, let me know and I will try and help you out. Just let me know your setup.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Turn off collider?
« Reply #2 on: May 11, 2016, 09:59:03 AM »
and search ecosystem for 'Enable Collider' for custom actions

ShazBang

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Turn off collider?
« Reply #3 on: May 12, 2016, 03:48:16 AM »
Thanks for that guys, big help.