playMaker

Author Topic: Mouse Pick 2d working inconsistently  (Read 123 times)

misterjuly

  • Full Member
  • ***
  • Posts: 209
Mouse Pick 2d working inconsistently
« on: May 25, 2022, 02:52:25 PM »
Hello,

I have a bunch of objects (maybe around 30 or so), that can be picked up by the mouse. However, it doesn't seem to work consistently. One time one object can be picked up then the next time it cannot. The states are working right, as it shows it on the get mouse down state. Is this too many objects? I was reading on another post to use mouse pick (not 2d) for better performance, but my game is in 2d, so I don't think this will work. Why does this happen? 30 events is nothing when your whole project has 100s of events and actions. Thanks!

John Bassi

misterjuly

  • Full Member
  • ***
  • Posts: 209
Re: Mouse Pick 2d working inconsistently
« Reply #1 on: May 25, 2022, 03:03:32 PM »
I think I got it. I had a collider on my mouse (I wanted my mouse to be a moving wall). This made it very hard to pick up objects. How could I still have a wall on my collider while being able to use the mouse pick 2d? Thanks!

misterjuly

  • Full Member
  • ***
  • Posts: 209
Re: Mouse Pick 2d working inconsistently
« Reply #2 on: May 25, 2022, 03:08:51 PM »
I figured out my second issue (just disabled the collider when the mouse button is pressed). Sorry to be a bother. Thanks!