Collision detection questions

Started by Nipsting, April 23, 2011, 07:46:12 PM

Previous topic - Next topic

Nipsting

Hi, recently started working on a game using this excellent engine.

I've got a few questions about how the collision detection in JPCT works though.

First of all, lets say I have a sphere moving at high speeds hitting another object, is there a chance it might not detect it if its moving too fast, or do the collision detection take the velocity vector into account and actually figure out there will be a collision one frame ahead of the actual collision, or in the case of sphere collision, is it just looking at the radius of the sphere and checking if the closest location it hits from the center of the sphere is less than the radius, which would give it a collision?

Also, how well would a sphere hitting a convex object handle collision detection.

I'm relatively new in the field of physics, but I'm prototyping a simple physics engine in Softimage using ICE atm, and will then be porting the math involved to java to use it with JPCT, so these questions might seem trivial, but I hope you can answer them none the less.

Edit: Did a bit more reading into the javadoc, I believe I could use checkForCollision which allows for a ray direction (using the velocity of the ball). Checking for a collision one frame ahead of time should be relatively simple then, I guess my question then would be if it is needed, or if it already does this.

Regards
Nipsting