How do I make a collision polygon with separate parts?

  • I need to give this shape a collision polygon (see attatched image below).

    http://imgur.com/a/twokX

    The black parts will not have collision (the player walks through those areas). The parts that are not completely black need to have collision so the player can collide with them. How do I make a collision polygon with 4 separate boxes to cover those areas?

  • I need to give this shape a collision polygon (see attatched image below).

    http://imgur.com/a/twokX

    The black parts will not have collision (the player walks through those areas). The parts that are not completely black need to have collision so the player can collide with them. How do I make a collision polygon with 4 separate boxes to cover those areas?

    If its a single sprite then you can't as the collision mesh always have to be connected. A way to solve that is to have a collision mesh layer so to speak, which are separated from the actual graphic. So on this layer you only have collision objects that you can arrange so they fit with the graphic layer.

    Another way, and maybe the most obvious choice seeing that you are using squared graphic objects, would be to use tile maps, as it would be faster and more performance friendly than using sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use invisible sprites pinned to the original sprite. Each invisible sprite acts as its own "collision area".

  • > I need to give this shape a collision polygon (see attatched image below).

    > http://imgur.com/a/twokX

    > The black parts will not have collision (the player walks through those areas). The parts that are not completely black need to have collision so the player can collide with them. How do I make a collision polygon with 4 separate boxes to cover those areas?

    >

    If its a single sprite then you can't as the collision mesh always have to be connected. A way to solve that is to have a collision mesh layer so to speak, which are separated from the actual graphic. So on this layer you only have collision objects that you can arrange so they fit with the graphic layer.

    Another way, and maybe the most obvious choice seeing that you are using squared graphic objects, would be to use tile maps, as it would be faster and more performance friendly than using sprites.

    I actually am using tile maps. I used a smaller tile map to create big 128x128 tilemap blocks, and with those blocks I can make levels much more quickly.

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