Skip to main content

Timeline for LibGDX obstacle collision

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Jun 16, 2015 at 12:18 comment added Robert P It depends an the shapes you have got. If you have unrotated Rectangles (AABBs), then you don't have to do other checks before, as an overlap check between them is pretty simple. Also a check, if two circles collide is pretty simple, if you don't use the squareroots (see this for more information). But if you have other or rotated shapes, the collision/overlap check might be more complicated and use more CPU. There it makes sence to do an AABB or distance check first.
Jun 16, 2015 at 11:29 comment added Fiochkij Another little question regarding this, what is the lightest operation to do between collision check and distance check / "in viewport" check? Is it worth using them before effective collision (a simple overlap) check or they have the same impact in performance?
Jun 16, 2015 at 11:23 comment added Fiochkij Thank you for your help!. The game is going to have a lot of code and I've already seen Scene2D creator's thread where he said that MVC pattern doesn't go well with it so i'm probably going to code my own system. Since there will be only a few objects on in memory at any given time I think that creating my own List of objects and checking is the best way (with filters). The intersector class looks really promising, thank for pointing me in the right way :P
Jun 16, 2015 at 7:03 history answered Robert P CC BY-SA 3.0