Hi
I’m trying to create a simple snooker type behaviour but figured it’d be better to use some simple ball physics instead of using the Unity physics engine as it’s for the iPhone.
Now I have the collisions between balls working fine using some simple physics code and can get collisions working fine most of the time on the walls by using colliders and Vector3.Reflect in an onCollisionEnter function. My problem arises in certain instances, usually when a ball goes into a corner, in that the physics engine is still operating on the balls from the wall collider. This combined with my code that tells the ball hwo to behave on collision causes the ball to get stuck in the wall and just vibrate along it.
So my question is can I use colliders and a rigidbody (which is the only way to obtain a onCollisionEnter callback which I need to get the contact point and normal to calculate the correct reflection angle off the wall) but turn all the actual physics off. Or is there an easy way of getting exact collision points and normals of spheres with mesh colliders without using a rigidbody.
I could of course just use the physics engine to do all this instead but with potentially up to 20 balls in play in the game we’re creating i thought this would likely cause frame rate issues on the iPhone. The other problem i found when trying this was getting very accurate physics responses which this game relies on. I found the bounce off the walls in particular to be quite unpredictable (sometimes bouncy sometimes would not bounce at all). Has anyone here had these issues using Unity iPhone?
Thanks for any help
Paul