playMaker

Author Topic: On Collision Enter Does not work! [SLOVED]  (Read 13609 times)

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
On Collision Enter Does not work! [SLOVED]
« on: February 27, 2016, 05:52:21 AM »
Hey All;

I am using Unity 5.3.2f1 with the latest Playmaker Beta 1.8.xx what ever the latest is, and the issue is when I have a object tagged BALL and I place the FSM onto the object I want that BALL to collide with.

Then I add a Collision Event action and On Collision Enter with the Collide Tag "BALL" send event "Did Collide" which then should go to the secondary state where I have an animation to trigger. then when finished send "Reset"

I have a collider and a rigidbody on the collision object.

However when I enter play mode without even colliding it goes to the second state and stays there, the BALL colliding with the object with the FSM does nothing at all.

So I am afraid that the Collision Event action is broken.

Any and all help would be greatly appreciated.

Thanks
« Last Edit: October 08, 2017, 10:48:35 PM by djaydino »

Ghosu

  • Playmaker Newbie
  • *
  • Posts: 10
Re: On Collision Enter Does not work!
« Reply #1 on: February 27, 2016, 11:33:03 AM »
I'm using the same version(s), works for me...so the function itself seems to be fine i guess. I often forget to set the collision tag since clicking on ADD TAG... only creates a tag but doesn't select it :D


Greetings


Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: On Collision Enter Does not work!
« Reply #2 on: February 27, 2016, 08:47:17 PM »
Thanks for the reply and video however I did add the BALL tag to the ball and the FSM is on the object it is colliding with and it just does not work. I have done much more complex stuff than this with playmaker so this is baffling me as to why it is not working. This is the first playmaker project with Unity 5.3.2f1 as I installed it yesterday. So I am at a loss.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: On Collision Enter Does not work!
« Reply #3 on: February 28, 2016, 12:21:04 AM »
The Collision Event action passes our automated tests so I'd need to look at your project to see what's going on... If you can, please send me your project privately (don't post it) and I'll take a look.

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: On Collision Enter Does not work!
« Reply #4 on: February 28, 2016, 11:33:42 PM »
Does not work even on Unity 4.6.3. I am at a complete loss as it is just outright ignoring OnCollisionEnter actions all together. What's going on with Unity? that could even cause this?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: On Collision Enter Does not work!
« Reply #5 on: February 29, 2016, 08:00:51 AM »
Are you sure the RigidBodies and Colliders are setup correctly?

In the past I have seen the internal Tags asset get corrupted... try adding another Tag to refresh it.

Again, if you have a small repro project please zip and send it to me and I'll take a look.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: On Collision Enter Does not work!
« Reply #6 on: February 29, 2016, 05:22:54 PM »
Hi guys  just a noob here. Ive had a lot of (noob) issues with collision and trigger events.

Most of them I think resulted, like Alex says above, from bad setup of rigid bodies and colliders.

I have now started adding a rigid body and a collider to every game object (the collider and the collidee) involved in the trigger/collision event. This seems to work well...

Although im pretty sure playmaker warns that the object requires either a rigid body or collider when adding a collision/trigger event- from my (noob) experience they actually need both to send the events (or maybe im wrong, but it seems to work like this so yeah...).

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
Re: On Collision Enter Does not work!
« Reply #7 on: March 04, 2016, 09:28:44 PM »
Hey Alex;

I sent you the project a few days ago, e-mailed you the link, did you get it? I will also try to PM it to you now just in case.

Thanks again for looking into this for me.

Omninorm

  • Playmaker Newbie
  • *
  • Posts: 33
Re: On Collision Enter Does not work!
« Reply #8 on: November 09, 2016, 01:54:58 PM »
Did you ever get this to work?
Following some tutorials on Collision Enter and mine doesnt work like that.

I'm trying to send an Collision event to another FSM. If I just use it with a mouse click the rest of the events / states fire correctly.
If I add the Collision Enter ... it just stays in this state.
I've added Rigidbodies to the Objects.

Basically what I'm trying to do is destroy a bullet clone on contact with a rigidbody and then deduct health from the enemy if it is the object that is hit.
I can't get the bullets to recognize anything w.r.t Collision Event.
« Last Edit: November 09, 2016, 02:12:40 PM by Omninorm »

monsterblues

  • Playmaker Newbie
  • *
  • Posts: 3
Re: On Collision Enter Does not work!
« Reply #9 on: October 08, 2017, 10:23:03 PM »
I know this is an older thread, but I have one possible answer. For me the collision event didn't seem to be working even though I followed a video tutorial exactly to get a pressure plate working.

The only difference was my collider was touching the floor. And the video tutorial had the collider a little bit above the floor. So I edited the collider to have a little and now it work.

I guess Collision Event is only testing the first collision per update.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: On Collision Enter Does not work!
« Reply #10 on: October 08, 2017, 10:48:05 PM »
Hi.
Yes, except when you setup layers.

GaTechGrad

  • Playmaker Newbie
  • *
  • Posts: 4
Re: On Collision Enter Does not work!
« Reply #11 on: October 30, 2017, 02:55:55 AM »
In the past I have seen the internal Tags asset get corrupted... try adding another Tag to refresh it.

I had an old Unity project from two years ago using Playmaker that I was trying to recompile tonight.  The game would play fine in the Unity editor, but collisions didn't work anymore after building for Windows.  After spending a few hours trying to figure out the problem, I found this thread.  When I opened the tag editor, there were missing tags, which showed up as "Removed Tag".  I added and assigned all new tags, and now collisions are working after building for Windows.

Slice

  • Playmaker Newbie
  • *
  • Posts: 3
  • Visual Designer & Developer
Re: On Collision Enter Does not work! [SLOVED]
« Reply #12 on: December 20, 2017, 04:42:03 AM »
Unity Verson 2017.2.1f1 - Collision Event not Working, i use Rigidbody on Player and trigger on Cube. ???