basic collision help
Blitz3D Forums/Blitz3D Beginners Area/basic collision help
| ||
can someone tell me why this collision isnt working? its quite simple <code> Graphics3D 800, 600, 16, 2 SetBuffer(BackBuffer()) ;heres how to do collisions:: Global done=False ; setup a camera cam = CreateCamera() Const C_hero=1 Const C_monster=2 Const C_Scene=3 Collisions C_hero,C_Scene,2,3 Collisions C_monster,C_Scene,2,3 Collisions C_hero,C_monster,1,2 EntityType cam,C_Hero EntityRadius cam,3,6 ;CameraRange cam, 0.05, 1000 PositionEntity cam, -3, 0.1, 3 ; use WASD keys to move around cube=CreateCube() PositionEntity cube,0,0,0 te=LoadTexture("medieval\wall.jpg") EntityTexture cube,te EntityType cube,C_Scene While Not done If KeyHit(1) Then done = True If KeyDown(17) Then MoveEntity cam, 0,0,0.005 If KeyDown(31) Then MoveEntity cam, 0,0,-0.005 If KeyDown(32) Then TurnEntity cam, 0,-1,0, True If KeyDown(30) Then TurnEntity cam, 0,1,0, True RenderWorld Flip Wend </code> |
| ||
You need to include the 'updateworld' command which performs all animation and collision checking. Currently it is not listed in your code above. |