playMaker

Author Topic: Physics ignore collision ( new 2d equivalent as well)  (Read 9779 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Physics ignore collision ( new 2d equivalent as well)
« on: June 19, 2013, 03:27:00 AM »
Hi,

 Following a request, please find an action to ignore collisions between two colliders. useful when firing projectile and ignore the character that fired.


bye,

 Jean
« Last Edit: September 23, 2014, 01:13:14 AM by jeanfabre »

PaulH

  • Junior Playmaker
  • **
  • Posts: 50
Re: Physics ignore collision
« Reply #1 on: August 07, 2014, 06:44:25 PM »
Hi,

 Following a request, please find an action to ignore collisions between two colliders. useful when firing projectile and ignore the character that fired.


bye,

 Jean

hi Jean,

i could really use this action right now but it isn't working for me, the collisions still happen. Please can you let me know if this is up to date and should it work with unity 4.5?

many thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision
« Reply #2 on: August 08, 2014, 07:44:26 AM »
Hi,

 http://docs.unity3d.com/ScriptReference/Physics.IgnoreCollision.html

read the description and make you comply with all the assumptions. It should work the same on 3.x and 4.x

if you comply, let me know, I'll double check with a test scene.

 Bye,

 Jean

Sadaan

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Physics ignore collision
« Reply #3 on: September 22, 2014, 05:44:33 PM »
Hi,

Is there a 2d equivalent of "Ignore Physics Collision"? Im making a 2d Platformer and I dont want the player to collide with the platform unless and until he is above it. Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #4 on: September 23, 2014, 01:14:56 AM »
Hi,

 yep, I have just pushed it to the ecosystem

Physics2dIgnoreCollision

 Bye,

 Jean
« Last Edit: September 23, 2014, 01:23:17 AM by jeanfabre »

Sadaan

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #5 on: September 23, 2014, 05:39:24 PM »
Hi,

Thankyou for your support. But the original version allowed to "ignore collision" between two specific gameobjects. The 2d version that you uploaded just allows to ignore collision between "two layers" which kinda voids the whole point. Could you please create a similar version of 2d ignore collision as the original 3d version.

Thanks :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #6 on: October 27, 2014, 05:45:14 AM »
Hi,

 good point, I should refactor this and create new actions for ignoring collision per layer, like the Unity api explicitly describe it.

 Thanks for pointing this out.

 Bye,
 
Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #7 on: October 28, 2014, 01:30:29 AM »
Hi,

 actually, it's good as is already. I think I know what happened, you need to redownload it, because I think I originally posted the verison you had and realized my mistake and corrected it straight away. Cause the physics2dIgnoreCollision is indeed not with layer but with colliders.

 can you double check this on your end? delete Physics2dIgnoreCollision action and redownload it.

 Bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #8 on: January 05, 2015, 07:11:34 PM »
Hi Jean, is there any way to prevent this action from returning this error?:

"Ignore collision failed. Both colliders need to be activated when calling this IgnoreCollision"

The problem I'm having is that I have instances where I want a gameobject ignored, but it may or may not be active at the time.

It works fine when I deploy the game, but it gets very annoying when trying to play in the editor. I'd much rather just ignore the error than to create a roundabout method to check if the object is active, when it is only an in-editor specific issue.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #9 on: January 19, 2015, 01:36:40 AM »
Hi,

I am not sure this is a good idea... :)

 If it's not active, then you should not call it, I think it's a problem of logic in your system. I know it's an extra step, but I think it's necessary for everyone's sanity during debugging of a problem, if we turn off warnings, then you are doomed in few month when you will have forget that you call ignorecollision yet it has no effect.

Maybe I could compromise and make some events on that action that are fired if ignore collision was validated or if indeed one of its object was not active, and then if that event is filled up, I could silent the warning because it's assumed you deal with in your fsm.

 Bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #10 on: January 19, 2015, 01:02:33 PM »
Not asking to remove the warning completely  :) If it can be changed to a warning message vs a game-stopping error message that would be OK with me.

Ultimately I'll have to deal with your decision on the matter, but in a complex setup such as mine where the object is a variable that constantly switches between being active and inactive (or may not be in the scene at all) it is causing headaches  :-\

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #11 on: January 19, 2015, 01:14:39 PM »
Ah,

 yes, I see what you mean, that I can do.

Please bump me early february, I am taking a short break starting tomorow :)

 Bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #12 on: February 03, 2015, 10:41:39 AM »
Bumping per your request...thanks Jean!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #13 on: February 16, 2015, 07:22:29 AM »
Hi,

Processed your bump, thanks for this. Need few more days tho, but I am here now, should be done this week.

 Bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Physics ignore collision ( new 2d equivalent as well)
« Reply #14 on: March 18, 2015, 04:19:20 AM »
Hi Jean,

Any progress on this?