0

Making a pinball game. Have the pinball going down but now I want it to interact with the walls (or the ground for now). Right now I have 2 rectangles, 1 over the other, as the board. 1 is slightly larger and placed behind the other and this makes it look like the board has 4 walls. Genius, right? I can see that I can create multiple box colliders, alter them to be where the 4 walls would be if they were independent objects, but I've noticed that there doesn't 'appear' to be a way to distinguish between them if I were to give the pinball a command depending on which collider it interacts with. I see there is a post about a similar thing: Unity multiple collider on same object. But it was from quite a while ago so I feel that it's still valid to ask this in case there's been an update since then.

So my question is: Am I better off just making objects for each wall rather than 1 that has the illusion of being 4, or is there a simpler trick in identifying which of the 4 colliders on that single object my pinball has interacted with?

E_net4
  • 27,810
  • 13
  • 101
  • 139
  • Probably only by checking a hit point to see where it is. Would be simpler to have 4 individual edges – BugFinder Jun 08 '22 at 13:24
  • Thanks for your feedback BugFinder. After doing some more research I'm leaning toward the same answer as you've given. – NatusPotatus Jun 10 '22 at 12:17

0 Answers0