SOLVED - How do I have an object with one polygon for collisions and another for selecting?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Here is a screenshot from my current game:

    The map is a grid and on these square sit objects that you can select and interact with. All of these objects are roughly square like, except for the "deflectors' which look like slashes.

    The problem is, it's easy to click/select the other objects, but it can be tricky to click on the selectors since they are skinny. Here is a picture of a deflector with it's collision polygon:

    My question is, how do I keep the collision polygon that size, so that bullets will properly collide and deflect off of it, while allowing someone to click it by selecting anywhere on the whole square?

  • Make a square sprite that you use for clicking, set it invisible, then use hierarchies to add the deflector as a child to that sprite. There's probably more nuance to this but I don't know your project exactly so I can't comment on that.

    construct.net/en/make-games/manuals/construct-3/interface/layout-view

    You can then use the "Pick children" condition of the sprite to pick the deflector itself if you need it for something (like rotating)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Make a square sprite that you use for clicking, set it invisible, then use hierarchies to add the deflector as a child to that sprite. There's probably more nuance to this but I don't know your project exactly so I can't comment on that.

    https://www.construct.net/en/make-games/manuals/construct-3/interface/layout-view#internalH1Link4

    You can then use the "Pick children" condition of the sprite to pick the deflector itself if you need it for something (like rotating)

    WackyToasterYou're awesome. An invisible square object on top, was the way to go. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)