Collision woes!
Blitz3D Forums/Blitz3D Beginners Area/Collision woes!
| ||
Hi all, I keep having problems with collisions, can someone tell me what I'm doing wrong? here's some code: Graphics3D 800,600 SetBuffer BackBuffer() type_walls=1 type_camera=2 cam=CreateCamera() EntityRadius cam,0.1 EntityType cam,type_camera PositionEntity cam,0,1,-20 light=CreateLight() box=CreateCube() ScaleEntity box,10,10,2 EntityType box,type_walls Collisions type_camera,type_walls,2,2 While Not KeyHit(1) Cls If KeyDown(203) TurnEntity cam,0,1,0 EndIf If KeyDown(205) TurnEntity cam,0,-1,0 EndIf If KeyDown(200) MoveEntity cam,0,0,0.25 EndIf If KeyDown(208) MoveEntity cam,0,0,-0.25 EndIf UpdateWorld RenderWorld Flip Wend End Am I missing something silly? Cheers Cheese |
| ||
If you are trying to collide with the interior of the box you will need to use the 'flipmesh' command or alternatively set the entityfx flag for the box to 16 (doublesided). |
| ||
I don't think double sided produces a collision response on the other side of a triangle, even if you use the double sided. I believe it's just a visual thing. |