How to collide boxes to each other and to a camera

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
sergeych92
Posts: 9
Joined: Mon Sep 03, 2012 8:13 pm
Location: Russia

How to collide boxes to each other and to a camera

Post by sergeych92 »

Hello everyone!

I was reading the tutorial and I didn't find how to collide two meshes if none if them is a camera or a line. Then I searched a little bit and found out that for this task people usually use physics engines. But my program is simple and I don't have much time to learn the physics stuff. I have boxes and one current box that is controlled by the user. This box must react to other boxes and the camera must react to all these boxes. My program should be more complex, but I haven't completed it yet. For example, the user should be able to choose a box in runtime and control it, and create new boxes.

Also I saw some questions about how to do this stuff without a physics engine. So, if you are new, you can use my solution to start. It's only a draft.

Here you go:

http://nopaste.info/76794f4412.html
Post Reply