Does rectangular 4 point polygon collider = box collider?

0 favourites
  • 3 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • In regards to setting up a collision polygon, does the engine always use polygon/polygon collision checks? Does the engine optimize the collision algorithm if both objects have perfect rectangles for collision shape (i.e. 4 points perfectly rectangular)?

    Also will there ever be support for circle/circle or circle/rectangle collision support?

    The reason why i ask is because I know that doing rectangle and circle collision checks are much simpler computationally than polygon collision checks. So I'm wondering if I can optimize my game by using only rectangles for colllision, or is that just wasting time?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C2 only uses collisions polygons if the bounding boxes are overllaping already (the bounding box is the smallest non rotated rectangle that the object can fit in, if the object is rotated, the bounding box does not rotate), this is part of the reason why you cannot set a collision polygon outside if the object.

    however polygons checks, when used, can be really time consuming but I would recommand: use a simple shape that just correspond to your object well. I do not think that, unless you have a very large number of poly checks in the debugger, changing the'polygons would help.

    also, for all the behaviors that use collisions, and on your events (under some conditions), collision cells are used: on a big environnement, they just makes objects completely ignore collisions as, well, there will not be collisions between them anyway.

    If you have perf. problems, try to see where that problem is comming from, if it is the collisions, then maybe you just need to check less collisions, accordingly to the design of your game.

  • Thanks for the reply Aphrodite,

    I will just not worry about it until I detect performance issues.

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