Jump to content
  • Advertisement

olivermarsh

Member
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

3 Neutral

About olivermarsh

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
  1. olivermarsh

    Box2d overview

    Thanks Dirk, box2dlite is exactly what I needed. Thanks for your help, your presentations have been very helpful.
  2. olivermarsh

    Box2d overview

    Hi, I was wanting to read the box2d source, but wanted to get a broad overview first. I'll just say what I understand so far: Box2d has discrete & continuous collision detection. We first integrate our shapes velocity, and using a 'conservative advancement algorithm, we advance the shapes & find toi. It then uses gjk & barycentric coordinates to find the closest point on the shapes. If theyre overlapping we use epa or sat (and dont get a contact point? Or run gjk again?) It then builds an incremental manifold (i probably have this wrong) adding a point each frame. Then once all collision points have been collected for the frame, they go through the collision solver that takes each collision, & adds an impulse to the shape to bring the relative velocity <= 0. We go through the list of contacts several times (the iterative rigid body solver), to stabilise the simulation. I'm not sure what it uses for discrete collisions? What things I don't understand is 1. When do we know we don't need a collision point anymore? When the collision points are moving away? 2. How do we know a contact point is unique with gjk/barycentric coords? Or do we just add them and wait till they get pulled off the list? 3. If the toi is less than one & we want to use the rest up, do we run the whole collision routine again for a max say 4 times, to use it up, and where does this fit into the iterative solver? I kind of just want to get an overview of how a physics engine fits together and the parts or algorithms we need. Its just for a hobby engine, and with understanding as a priority. Any help would be great, and sorry if the question is a bit over simplified.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!