playMaker

Author Topic: Get Collision 2D info not working correctly? [SOLVED]  (Read 2875 times)

Reynolds

  • Playmaker Newbie
  • *
  • Posts: 5
Get Collision 2D info not working correctly? [SOLVED]
« on: October 27, 2014, 06:02:07 AM »
Hi! I'm not getting correct info from "Get Collision 2D info" action.
I made a simple test setup with circle and box and tried to get the contact point of collision (to spawn particles etc.). However the contact point vector always shows 0,0,0 no matter what. However it detects the colliding objects and passes to next state correctly. I have 2D proxy on all objects.

I made this same test with 3D physics and it works just fine.
What am I missing here? I have unity 4.6 (tested with 4.5.5 also..) and playmaker 1.7.7.f6 with 2D add-ons.
« Last Edit: October 31, 2014, 02:01:07 PM by Reynolds »

Reynolds

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Get Collision 2D info not working correctly?
« Reply #1 on: October 27, 2014, 09:15:50 AM »
I'm quite new to unity and playmaker but I have made a lot of googling and search on this, but I still don't get it. Any help on this will be much appreciated!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Collision 2D info not working correctly?
« Reply #2 on: October 28, 2014, 01:38:24 AM »
Hi,

 I doubled checked and it works.

 can you pm me with this scene  or attach it to this thread so that I can test locally if I can repro this?

 Bye,

 Jean

Reynolds

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Get Collision 2D info not working correctly?
« Reply #3 on: October 28, 2014, 04:49:15 AM »
Thanks for your reply!

Hmm.. weird, and I know it should work. If you have time, please take a look at my scene files and check if I'm missing something.

Download link:
[ADMIN: Removed. Please don't post complete projects that include the PlayMaker dlls! I downloaded and will share with Jean]

Cheers,
Reynolds
« Last Edit: October 30, 2014, 08:37:08 PM by Alex Chouls »

Reynolds

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Get Collision 2D info not working correctly?
« Reply #4 on: October 30, 2014, 02:43:35 PM »
Is there anybody who could give me any advice on this? I'm quite new to playmaker and unity, and I'm probably missing something obvious but just can't figure out what it is..

My simple goal is to get collision point of two 2D objects. I managed to do it with 3D physics but not with 2D. It just shows me that the point of collision is always 0,0,0.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Collision 2D info not working correctly?
« Reply #5 on: October 31, 2014, 02:17:08 AM »
Hi,

 give me few days, I'll have a look. I already did verified this on a different thread few days ago and the action works, so it's likely in the scene setup.


Bye,

 Jean

Reynolds

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Get Collision 2D info not working correctly?
« Reply #6 on: October 31, 2014, 02:00:31 PM »
Finally I figured out what was wrong:
You should use a global event "COLLISION ENTER 2D" and this works fine and reads collision points etc.

Thank you Jean for your effort! Playmaker is really fun!
« Last Edit: October 31, 2014, 02:25:14 PM by Reynolds »