Collision Shape

Discussion in 'Technical Discussion' started by Deliverbo, Jun 17, 2018.

Tags:
  1. Deliverbo

    Deliverbo Avid Boxer

    Joined:
    Dec 2, 2015
    Messages:
    220
    Likes Received:
    69

    Hi everyone,

    If most of the objects in our game have a circle collision shape as apposed to a polygon shape, will the game have less lag?

    Thanks,

    Danny
     
    Last edited: Jun 17, 2018
  2. AndyG

    AndyG Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,100
    Likes Received:
    915
    Collision shape has no affect. Number of Atlases is your #1 concern priority. The fewer the better.
     
    Deliverbo likes this.
  3. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    There is a small performance gain by using circles instead of a polygon, but it's all relative. There are many other things that will affect performance, perhaps by a lot more. Just a few objects being changed from polygon to circle would probably not make any noticeable difference unless there were thousands of copies of the objects used in the game.
     
  4. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Just out of curiosity, does a collision shape affect performance if it's not used and the object is set to decoration?
    Say I have thousands of objects that never collide but all have 8 sided collision shapes, would it increase performance to change them all to circles even though they're never tested for a collision?
     
    Deliverbo likes this.
  5. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    No, the performance savings is in the calculation for collisions.
     
    AaroArts likes this.

Share This Page