# colliderbox not function

hello every one.

I’am beginner and i need your help. I want to make a game of gestion with a system of convoyer belt in 2D. The camera is on the top and gravity is allong the z axis

So i launched a new 2d project and i drew a really fast first prototype of convoyer belt. I added it in unity and now im tring to add coliderbox and rigidbody for make some scripts and for prevent GameObject to fall through convoyer belt. I also made on unity a 3Dcube with rigide body and collider box for do some test. The convoyer is at z=0 and i drop the cub at z=10.

The problem that i have is my cube pass through the convoyer belt. I dont really understand because both have regidbody and colliderBox (not 2d collider or 2d rigidbody). MayBe i miss somthing. some one can help me?

Make sure your Colliders arent set to trigger. Also, you said you made a 2D project but you are talking about 3D objects so you may want to post this to a different section of the forum.

I recommend a beginner video or two about Unity and its physics system to help you understand these things better.

Yes i want do a game as factorio. 2d collidbox are just on xy plan. but here the gravity is allong z. For this reason i add 3d collider box. and no it’s not set to Trigger.

Well, just start basic to make sure its all set up properly. Make a large ground object (Cube gameobject and stretch it out) with NO rigidbody and then another cube or a ball above it with both a collider and a rigidbody. Press play and see if they collide, they should if you use the right type of collider.

I really recommend a video like this since you are a beginner:

thank you.

I want to do something as it’s done on your video but in 2D.

I know how function collider and same in 2d already did collide 2 objects on the xy-plan with 3dcolliderbox. I dont know why that should be problematic. it’s like put a paper-sheet in a box. And it’s not because unity call that 2D project that they is no Z-axies. Indeed when i set my cube at z=10 with gravity, it fall. So i dont really understand why its should be problematic.

i want do somthing like that. as you can see it’s a 2d game with convoyer belt. For that my method is to use gravity like that i can have 2different gameobject for convoyer and for other ressources and they can have a more or less realistic physics. but maybe unity in 2d game can’t take into account colisions on the z-axis. maybe my methode is not the good one for a 2d game. but how can i do it that so?