On 24/01/2015 at 04:34, xxxxxxxx wrote:
Hi
I'm about to start a project which involves moving particles that bounce off or flow along a geometric surface.
As a starting test, I'd like to bounce a particle around inside a cube. So the particle has a position and a random starting velocity, and when it reaches a wall of the cube, it bounces in the appropriate direction. Looking around the SDK I can't see much in the way of collision detection and physics, so I guess I'll have to work things out manually - which I prefer anyway.
So my particle needs to know if it has reached a polygon (wall of the cube) - how might this be this done?
I would then imagine a reflection angle needs to be calculated based on the velocity vector of the particle and the normal of the polygon.
Any help appreciated, cheers,
Glenn.