Particle collisions
In my physics engine I do not timestep my particles which are special case for my engine. I figured this could cause slowdown since I want to do a lot of particle effects that react to the world. What happens tho is my dynamic objects can end up moving behind where the particle is now and when the particle is updated it moves in front of the object, so a simple distance check will not work. So how could I solve this problem? I was thinking I could test the particle before and after a update but this is adding extra collision testing which is what I want to avoid. I was also thinking of capsuling up the particles path from the birth to the current time or maybe from a couple frames ago to the current time and if anything passes thru the capsule see if the particle was there at the time and then test for collision. After collision I could restart the capsule.
What do other people do?
I''ve recently started working on a simular problem, and this is what I came up with so far...
Instead of thinking of your particle as a point consider it as a line segment where the end is located as it current point and its start is at its last point (before time is incremented). It is very easy to determine if and where a line segment intersects another object. All you have to do now it bring your particle back to the point of impact and resolve it.
I don''t know if this is what you''re looking for but I hope its helpful.
-m
Instead of thinking of your particle as a point consider it as a line segment where the end is located as it current point and its start is at its last point (before time is incremented). It is very easy to determine if and where a line segment intersects another object. All you have to do now it bring your particle back to the point of impact and resolve it.
I don''t know if this is what you''re looking for but I hope its helpful.
-m
Thats what I do now. The problem is that I dont integrate my particles because I feel it would be too slow. I simply do physics like normal and once all object are determined to not be colliding I then check them for particle collisions. The problem is that a dynamic object can move behind the last frames position of the particle. Thats why I was thinking of using the whole particles path for the collision. As long as a particle has not collided with something it has a defined position along any path. As long as I can find an object that intersects the bounding volume of the particles path I can extract the point of the particle and then test it. I was just wondering if that what other people do.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement