playMaker

Author Topic: Get Next Overlap Point 2D  (Read 3903 times)

Phillament

  • Playmaker Newbie
  • *
  • Posts: 44
Get Next Overlap Point 2D
« on: December 27, 2013, 01:23:12 AM »
Hi, I was wondering how to use the Get Next Overlap Point 2D action. Would this help with performance issues? I'm noticing that there are a lot of trigger events being logged, and it seems to cause lag. I'm not sure. Either way, I'm having an issue with lag, and I'm just trying to find ways to fix this. I tried looking for answers in the forum but I got a database error. I hope someone knows how this can be fixed.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Next Overlap Point 2D
« Reply #1 on: December 27, 2013, 05:38:38 AM »
Hi,

 The db seems to have problems, hopefully it will come back to normal soon.

Performance issues can be as problematic with GetNextOverlapPoint2D then with colliders, it depends what you do with it really.

here, it will simply allow to iterate through all sprites found under that point. the unity function used is Physics2D.OverlapPointAll:

http://docs.unity3d.com/Documentation/ScriptReference/Physics2D.OverlapPointAll.html

Bye,

 Jean


bye,

 Jean

Phillament

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Get Next Overlap Point 2D
« Reply #2 on: December 27, 2013, 01:03:35 PM »
Hmmm, I'm trying to find a way to make the game run without lag. I'm using triggers for my colliders. There seems to be a lot going on judging from logs in the console. How do I make it so that only specific colliders/triggers are using up the memory? Right now things really slow down when the enemies overlap with each other, which is not what I want.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Next Overlap Point 2D
« Reply #3 on: December 28, 2013, 02:52:10 AM »
Hi,

 You will need to profile and get a better overview of what is causing this lag, else it will be difficult for you to progress on that front.

-- have you try to run this without any editor window? just the gameview? does it run better. Unity Editor + PlayMaker Editor really takes a lot of resources so your game perf is never really something to account for within Unity Editor so much.

-- what exactly are you doing with these colliders? what do you check, how do you check, and what logic are you running based on colliders/triggers collisions? that's likely what takes up perfs, not just the fact that you have lots of colliders.

bye,

 Jean

Phillament

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Get Next Overlap Point 2D
« Reply #4 on: December 28, 2013, 03:32:23 PM »
Okay so I figured out that I hadn't yet configured the Physics 2D settings, and handling that has made a whole lot of change.

The Triggers are being used in conjunction with this other plug in, Killer Waves. The interactions between objects are being handled by triggers. So if the player shoots an enemy, the missile hits their collision box and triggers an event like that. Does that make sense?

As for profiling, I think it's only for Unity Pro, which I'm not using. I'll have to find other means to do so.

When I test the game I make sure to maximize the game view, and that definitely improves the performance.