[iPhone] Wrong computations when compiling for iPhone 2.1

mattjakob
Posts: 1
Joined: Mon Oct 26, 2009 11:17 am

[iPhone] Wrong computations when compiling for iPhone 2.1

Post by mattjakob »

Hello,
we are trying to make a small iphone application involving a container (a cylinder mesh) and a bunch of cubes falling inside it.
Everything goes fine on the simulator and on the iPhone SDK 3.0 but then when testing it on an iPhone SDK 2.2 some cubes pass through the cylinder.
We think it's because when compiling for SDK 2.2 Xcode uses Gcc 4.0 instead of 4.2 and this somehow (floating point precision maybe) affects the calculations for the collision.

Any idea why this happens?


Thanks,
mbykovskyy
Posts: 6
Joined: Fri Jan 30, 2009 4:49 pm

Re: [iPhone] Wrong computations when compiling for iPhone 2.1

Post by mbykovskyy »

I think the problem is in the interpolation. It sounds like it misses the collision check. Sometimes on slower devices when the simulation step is too big it misses the collision. Try tweaking it.

Max.