views:

31

answers:

1

I'm doing simple collisions on moving, coloured pixels. If their velocity get's higher than 1, the pixels may pass through something in the static world I'm trying to collide with.

How do I compensate for this?

+1  A: 

This C++ example uses a vector based approach to predicting the paths of particles undergoing elastic collisions. This Java example is similar, rewinding to the start of a collision between particles when overlap is detected. In each, the critical element is separating the model from the view. By doing so, it's possible to iterate the model at 1 pixel/tick and update the view at a different, variable rate.

The article 2-Dimensional Elastic Collisions without Trigonometry may also be helpful.

trashgod