- Home /
Collision & 2D
I'm about to make a 2D game in unity, but I'd like to know how to work with planes. Obviously the easier way to do this would be using the box collision detection, and I understand how to do this. My question is about how to do the collision tests over non square objects?
Thanks.
Answer by 4illeen · Dec 16, 2011 at 11:33 PM
If you use 3d models but the game is 2d (seen from above of platformer style) you can use Mesh Colliders. If not, you could attach some empty objects with small box or sphere collidres as children in few places so that they trigger when objects meet.
Great answer I hadn't think about... I'll see how it goes... thanks!
Answer by Pixelcloud Games · Mar 18, 2013 at 03:42 PM
You might be interested in the "2D ColliderGen" Extension, it allows you to automatically generate MeshColliders for your game objects from a sprite image’s alpha-channel. http://pixelcloudgames.com/tools/2d-collidergen
Your answer
Follow this Question
Related Questions
Child Collides If Its The Parents Collider 0 Answers
Objects don't collide 1 Answer
Childs Collision Calls Parents OnTriggerEnter2D() 0 Answers
isTouching() with multiple colliders 0 Answers