Sandy 3D: Create a Physics Room

I was wondering if anyone could help me get started with creating a room in Sandy 3D. I know I can create planes, but I'm not sure how to implement simple physics (i.e. the player cannot walk through a wall). Is there an easy way to do this, or do I need to take a look at something like WOW (3D physics engine for Flash)?

Thanks Cameron

+1


source to share


2 answers


If you just want to stop the player walking along the walls, you can use 2D Maths for collision detection.



I used this method to do PaperVision Games explained on my blog .

+1


source


If this is a first person system, that is, you are the camera, then just check the distances from the camera to the wall. If the distans are less than your predefined "fatness" of your face, do not move in it (which would be normal forward). If you are using some kind of avatar (second / third person system), the Shape3d object has a bounding box that can be used to test for collisions.



+1


source







All Articles