Hi guys,
I have a small issue with impulse based physics. After loading a 2d array of inifinite mass "bricks" (32x32) into a game level and dropping a character with finite mass on top of the bricks everything works fine until the character spans two bricks. That's when the jitter starts.
Code is pairwise AABB vs AABB testing like so
for(unsigned int i=0;i<entities.size();i++){
for(unsigned int j=i+1;j<entities.size();j++){
if(entities[i]->rigid->i_mass==0.0f && entities[j]->rigid->i_mass==0.0f)
continue;
//check collisions here
}
}
I don't quite understand what's going on here. All the collision and physics works fine until a third finite mass entity is in contact with two infinate mass entities, whether the two inifinate mass entities are in contact or not.
I did not test this on other shapes, just AABBs.
Could this have something to do with floating point errors perhaps?
Thanks,
Mike