I'm trying to make a game in DirectX8 and I can walk around my world but I can walk truh the walls, how can I block this??
I'm really desperated.
Thanks
Anyways, if you aren't interested in collision detection (or you don't need perfect collision!) you can create a bounding box for your model. Just create a 3D rect (a cube) and check whether vertices are inside of the box or not. You could easily create a UDT for the cube -
Type iRect3D
X as Double
Y as Double
Z as Double
toX as Double
toY as Double
toZ as Double
End Type
I believe that would work nicely. Just as I said before, check if wall vertices are inside the bounding box and if so move the character to where they were their last frame.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
(Just a heads-up)