How do you make your objects detect collision??

I’ve been trying to figure this out all week, but can’t find a clear explanation.
Is there someone who could give me a step-by-step or something on how to make an object for collision detection?

I’m making a game with a maze, which was created in Maya, and I just want to make it to where you can’t walk through the walls. Can anyone help? This is my first game and I could really use some help.

I appreciate it!

Are you using Panda’s built-in collision, or another system (such as Bullet)?

If you’re using Panda’s collision system, have you looked at the manual’s section on collision detection (starting here), and especially the “Pusher Example”?

Otherwise, there is one caveat: if I recall correctly, Panda’s collision system by default doesn’t check for collisions against ordinary, visible geometry. It can be done, but it may be better to instead have your model exporter generate and export collision geometry alongside your model. I use Blender, not Maya, so I’m afraid that I don’t know the exporter for the latter–hopefully someone else will provide advice on how to export collision geometry with it.

I have no idea what I’m doing. haha

I really wanted to know how to export the model WITH collision detection in maya if that was possible. Our maze is really complicated and I’ve got to have collision detection by tomorrow, I don’t think I’ll be able to get it done any other way.

I actually have blender, not maya, but the person making the models is using maya. I can figure out a way to put maya files in blender, and maybe do it that way?

Could you explain to me how to export blender files with collision detection, if you can?

There are a few limited instructions for flagging models to have collision solid information in Maya on this page: … _from_Maya

You still need to set up the code for the collision detection in the application, though.

Given the time-frame that you mention, it might be safer to stick with Maya than to attempt to import into Blender, then export out again, especially given the link that rdb provided just above.

If you want to check whether your model is exporting with collision, open the exported egg file in PView, then press shift-c; if the collision geometry is present, it become visible.

As rdb mentioned, be aware that just exporting collision geometry doesn’t cause collisions to work on the game–there’s a little work to be done in the program itself, too–again, see the example to which I linked in my prevous post.