Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: jeanfabre on June 19, 2013, 03:27:00 AM

Title: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre 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
Title: Re: Physics ignore collision
Post by: PaulH 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
Title: Re: Physics ignore collision
Post by: jeanfabre 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
Title: Re: Physics ignore collision
Post by: Sadaan 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
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre on September 23, 2014, 01:14:56 AM
Hi,

 yep, I have just pushed it to the ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)

Physics2dIgnoreCollision (https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/4de9d5441615dd044e9c2fff18f6818242db8b76/Assets/PlayMaker%20Custom%20Actions/Physics%202d/Physics2dIgnoreCollision.cs)

 Bye,

 Jean
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: Sadaan 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 :)
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre 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
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre 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
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: MABManZ 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.
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre 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
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: MABManZ 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  :-\
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre 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
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: MABManZ on February 03, 2015, 10:41:39 AM
Bumping per your request...thanks Jean!
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre 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
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: MABManZ on March 18, 2015, 04:19:20 AM
Hi Jean,

Any progress on this?
Title: Re: Physics ignore collision ( new 2d equivalent as well)
Post by: jeanfabre on March 18, 2015, 05:07:47 AM
Hi

 Thanks for the bump it was needed :)

 Can you get it again from the Ecosystem? it now check prior executing the action and will log a warning in PlayMaker console instead of that exception coming from Unity directly.

 Bye,

 Jean