Very good! The letters are just a bit too close but nothing too noticeable, much better then before. Music is nice, too.
I see that in the background scene with that puddle there is a sign reading "Warning Sweage". Did you mean Sewage?
I created my own collision algorithm, but I have no idea how to implement rotation it it.
norm = norm.unit();
PhysicsObject a = this;
Vector2D ua = a.velocity;
Vector2D ub = b.velocity;
Vector2D uab = ua.subtract(ub);
if(uab.dotProduct(norm) < 0) {
double e = (a.elasticity + b.elasticity) / 2;
double f = Math.min(a.friction, b.friction);
Vector2D tang = norm.perpendicular();
Vector2D uaNorm = ua.projectOnto(norm);
Vector2D uaTang = ua.projectOnto(tang);
Vector2D ubNorm = ub.projectOnto(norm);
Vector2D ubTang = ub.projectOnto(tang);
Vector2D vaNorm = elasticCollision(uaNorm, a.mass, ubNorm, b.mass, e);
Vector2D vbNorm = elasticCollision(ubNorm, b.mass, uaNorm, a.mass, e);
Vector2D inelasticVTang = inelasticCollision(uaTang, a.mass, ubTang, b.mass);
Vector2D vaTang = inelasticVTang.scale(f).add(uaTang.scale(1-f));
Vector2D vbTang = inelasticVTang.scale(f).add(ubTang.scale(1-f));
a.velocity = vaNorm.add(vaTang);
b.velocity = vbNorm.add(vbTang);
}
I wonder if a solution would be to have a method that applies an impulse to a certain point on the body or something?
I found some site that explained collisions a little bit, and the formula from there is used here:
http://www.myphysicslab.com/collision.html
But it doesn't say anything about friction, and I don't completely understand it :(
Oh, and the blue ball is twice more massive then the red one, I forgot to say that in the description.
2009/11/8
Global Men
2009/11/8
Midori World
2009/11/8
Midori World
2009/11/8
Rigid Body Physics Engine
2009/11/8
Rigid Body Physics Engine
2009/11/8
Global Men
2009/11/8
Global Men
2009/11/8
Pyro Sand New
2009/11/7
Rigid Body Physics Engine