views:

726

answers:

2

Hello,

I was wondering if anyone can help me get started with creating a room in Sandy 3D. I know I can generate the planes, but I am unsure as to how to implement simple physics (i.e. the player cannot walk through a wall). Is there a simple way to do this, or should I look into something like WOW (3D physics engine for Flash)?

Thanks, Cameron

+1  A: 

If you just want to stop the player walking through walls, you could consider using 2D Maths to do the collision detection.

I used this method to make some PaperVision Games, explained on my blog.

Iain
+1  A: 

If it is a first person system, i.e. you are the camera, then just check the distans from the camera to the wall, If the distans is less than your predetermined "fatness" of your person, don't move in that direction ( that'd normaly be forward ). If you use some kind of avatar ( second/third person system ), the Shape3d object has a bounding box, that can be used for collision testing.