- Home /
Colliders of a two 3d Objects working differently(Coin Dozer Style Game)
I am using two coins in the game. The Game is of same concept as a game named Coin Dozer on Android Market. One Coin is a Round, Another one is Hexagonal. Both have mesh Colliders. Convex is checked in the collider. Collision Type is set to Continuous Dynamic
The problem is simple when i use Round Coin everything works perfectly and there is not a single problem, But as soon as i use that hexagonal coins, problems occur.
I am using a cube to push the coins off the table. When using Round Coins everything works perfect, cube pushes coins perfectly but as soon as i use the Hexagonal Coin ,Cube passes inside the Hexagonal Coin sometimes it collides and sometimes it doesnot.
I donot understand why this must be happening. Cube has mesh collider attached to it, also tried box collider but having the same result. Cube is animated by animation Clip. The Collision type is set to Continous Dynamic
This image is of Round coin that works perfectly
This image is of Hexagon Coin that doesnot work perfectly
Answer by justin_iSO · Mar 14, 2013 at 02:52 PM
Firstly I would use a box collider on the cube instead of mesh because that is going to give you the best performance. As far as your problem goes, not really sure what is going on. Both round and hex have mesh colliders that are convex? Are there any other differences between hex and round such as rigid bodies, being on different layers, etc?
A good thing to try would be to put a primitive collider (such as box or wheel) instead of a mesh collider on both round and hex and see if you still only get one working. If you do then you know it is probably not the colliders themselves.
Lastly if primitive colliders work for you (and behave in a useful enough manner) I would make an argument to just keep using those if you are building a coin-dozer type game as you will get a good performance boost that way especially if using a significant number of coins at once.
Good luck! ~Justin
Your answer
Follow this Question
Related Questions
Destroying object when player walks over it 1 Answer
Ignore collision at high velocity. 1 Answer
Trouble with Physics.IgnoreCollision 0 Answers
Unwanted jittery behavior 2 Answers
Colliders in a wall jut out 0 Answers