Results 1 to 5 of 5

Thread: Collision Pont_Inside penetration_depth

  1. #1

    Default Collision Pont_Inside penetration_depth

    Hi, how can I calculate penetration depth and normal for a point inside the outline?

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    As far as I know, there are no active developers that can remember how the collision code works.

    Have a look at ClanLib-2.3.6/Tests/Display/Collision - It may help

    (Also, it is rumoured ClanLib 3.0 collision is to be rewritten using Box2D via clanPhysics ... but that might be last next year)

  3. #3

    Default

    Quote Originally Posted by rombust View Post
    As far as I know, there are no active developers that can remember how the collision code works.

    Have a look at ClanLib-2.3.6/Tests/Display/Collision - It may help

    (Also, it is rumoured ClanLib 3.0 collision is to be rewritten using Box2D via clanPhysics ... but that might be last next year)
    I've looked already on it and it does only outline->outline collision

    btw, box2D will be nice but hope it will not replace the existing features, as outlines information can be nice for platformers where you don't need heavy physics.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    The collision system has a single fatal problem, that renders it useless in most situations.

    Lets have 2 objects (A and B)
    'A' is a rectangle 2 pixels wide and 10 height
    'B' is also a rectangle 2 pixels wide and 10 height

    'A' is located at (0,0). 'B' is located at (2,0)
    At that point they are not colliding.
    If 'A' moves horizontally 4 pixels, thus is in location (4,0)
    'A' is not touching 'B', but should have collided with 'A' during the transition.

    The current Collision system cannot handle this situation.

    In games that I have worked in, the collision boxes are always made up of rectangles. When an object moves, you can extrude the points (using difference between of the old and new point).

    Maybe this problem can be fixed?

    When creating the Examples/Display/Collision, I tried extruding the collision outlines in an attempt to solve this problem, but ended up in a mess (too complex for myself to code) - Also there are faster methods

    Instead, it checks for collision for every pixel the object moves. (See
    #ifndef "PIXEL_TRANSVERSAL_COLLISION_DETECTION" in the code)
    That is slow, especially if the object moves rapidly.

  5. #5

    Default

    Thanks for response

    Yes, I know about tunneling effect and I'm using simple techniques to avoid them, like slow movement, big collisions objects, frames subsampling.

    Anyway, I wanted just to know if it was possible to get information from point inside outline test

Similar Threads

  1. ClanLib 2.40, Bug in Collision.
    By Sasker in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 06-30-2012, 06:17 AM
  2. Separate collision box...
    By speeder in forum Novashell Game Creation System
    Replies: 4
    Last Post: 06-12-2010, 07:21 PM
  3. Collision, where you went???
    By speeder in forum Novashell Game Creation System
    Replies: 1
    Last Post: 05-10-2010, 10:23 PM
  4. Collision detection
    By JoseMan in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 04-26-2010, 04:37 PM
  5. Collision...
    By catch22 in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 07-17-2009, 04:07 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •