简体   繁体   中英

Colliders not working in Unity3D 2D Project

I have 2 colliders, its a game where I have a ball, and a Labyritnh. The ball should pass through the labyrinth and collides with the labyrinth's walls.
But I have a problem, the physic aren't working that well, the collider don't work.
I have a rigidbody and a collider in both of these objects.
Also, I have a problem with choosing box or edge colliders.
Because it is a labyrinth, I need to design the colliders with some complex shapes.
I have used edges colliders and box colliders but the ball is passing through all these colliders like nothing, It seems like its not working.
Can someone help me?

you need a rigid body object attached to at least one of them for the colloders to work. make each wall individually and use rectangel colliders. add a rigidbody component, and set that rigid body to kinematic. should work then.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM