Precise Collisions

I decided to take a break from my Archviz scenes and make my first little Unity game given all the talk about the iPhone lately.

The game is a 3DSlidePuzzle http://www.livingartz.com/unity/3DSlidePuzzle2.html

I am a designer not a coder so the only script from me is a simple Retrict to “0” on the Y-axis script to stop the cubes bouncing out of the blue base.

I have a few issues with this game.

  1. I have to make the Box Colliders on the white cubes larger than the cubes to prevent the cubes cutting through each other before colliding. See attached image.

  2. If you drag a cube hard enough towards another cube against the sides it will engulf the next cube.

  3. The cubes cut through the side of the blue base which has a Mesh Collider applied to it.

Each cube has a Box Collider, RigiBody and RetsrictToYaxis script.

The Main Camera has a DragRigidBody script applied to it.

By placing Planes with Box Colliders in from the sides of the Blue base I can make the cubes stop from cutting through the blue base, but I would have thought I should not need to resort to this. The game without the Planes http://www.livingartz.com/unity/3DSlidePuzzle.html By doing this it does resolve issues 1 and 3 above.

If anyone has any ideas about fixing the above issues I would appreciate it.

Once I prove out the interactivity I will replace the models with cubes that share one textured image that I would like the player to be able to swap out with their own image if that is within the ability of Unity to do so. Then add a button to scramble up the cubes for the start of each game.

You should:

  • Make your tiles bigger

  • Decrease “Min Penetration For Penalty” in Physics Manager settings: Unity - Manual: Physics

Cheers Matthew,

That helps a lot.