Hi, I'm learning Blitz3D and using some of the tutorials and sample items to do it. One thing I can't get to work is that when my "dude" player runs into the castle, he'll just go through it instead of being stopped. I've set collisions, but it doesn't work for on the castle for some reason. can suggestions? thanks
;graphics Graphics3D 800,600,0,1 SetBuffer BackBuffer() ;collision groups Global SCENERY = 1 Global PLAYER = 2 Global MAINCAM = 3 Global CASTILLO = 6 ;light Global light = CreateLight() RotateEntity light, 90,0,0 ;CAMERA PIVOT camera_pivot= CreatePivot() EntityRadius camera_pivot,1.4 EntityType camera_pivot,PLAYER ;CAMERA Global camera = CreateCamera(camera_pivot) CameraRange camera,1,1000 CameraFogMode camera,1 CameraFogRange camera,60,200 ;PLAYER Global dude = LoadMD2("tris.md2") EntityTexture dude,LoadTexture("armourgreen.pcx") ScaleEntity dude, 0.1,0.1,0.1 EntityType dude,PLAYER EntityRadius dude,1.4 Global playeranimated = .5 ;SKY Global sky = CreateSphere(16,camera_pivot) FlipMesh sky ScaleEntity sky,100,100,100 PositionEntity sky, 0,50,0 sky_tex = LoadTexture("sky.bmp") EntityTexture sky,sky_tex ;TERRAIN Global terrain = LoadTerrain("height3.jpg") TerrainDetail terrain,2500,True ScaleEntity terrain, 3,15,3 PositionEntity terrain,-1000,0,-530 ter_tex = LoadTexture("mossyground.bmp") EntityTexture terrain,ter_tex EntityRadius terrain,0.2 EntityType terrain,SCENERY ; CASTLE Cast = LoadMesh("castle1.x") EntityRadius cast,.2 EntityTexture cast,LoadTexture("castlest.jpg") PositionEntity cast,-30,4.65,100 RotateEntity cast,0,90,0 ScaleEntity cast,0.1,0.1,0.1 EntityType cast,SCENERY ;Position the camera PositionEntity camera_pivot,0,10,120 PositionEntity dude,0,10,140 EntityParent camera_pivot,dude ;colissions Collisions CARPET,SCENERY,2,1 ;NEW : Collisions PLAYER,PROPS,2,2 Collisions player,scenery,2,2 Global apitch = 0 Global aroll = 0 ;main loop While Not KeyHit(1) MoveEntity camera_pivot,0,0,MouseZSpeed()*10 aroll=0 apich=0 dx#=MouseXSpeed()/2 dy#=MouseYSpeed()/2 If KeyDown(200) And playeranimated = 0 AnimateMD2 dude, 1,0.1,41,46 playeranimated = 1 End If If KeyDown(208) And playeranimated = 0 AnimateMD2 dude, 1,0.1,46,41 playeranimated = 1 End If If KeyDown(200) MoveEntity dude,0,0,.05 Else If KeyDown(208) MoveEntity dude,0,0,-.05 Else If playeranimated = 1 AnimateMD2 dude, 3,0.1,1,1 playeranimated = 0 End If If MouseDown(2) apich = dx# aroll = dy# ;If dx#>0 Then aroll=aroll-4 ;If dx#<0 Then aroll=aroll+4 ;If dy#>0 Then apich=apich-4 ;If dy#<0 Then apich=apich+4 MoveEntity camera_pivot,apich,aroll,0 ;If KeyDown(203) MoveEntity camera_pivot,6,0,0 ;If KeyDown(205) MoveEntity camera_pivot,-6,0,0 If KeyDown(157) MoveEntity camera_pivot,0,-5,0 If KeyDown(54) MoveEntity camera_pivot,0,5,0 PointEntity camera_pivot,dude MoveMouse GraphicsWidth()/2,GraphicsHeight()/2 EndIf If KeyDown(203) TurnEntity dude,0,2,0 End If If KeyDown(205) TurnEntity dude,0,-2,0 End If x#=EntityX(dude) y#=EntityY(dude) z#=EntityZ(dude) UpdateWorld terra_y#=TerrainY(terrain,x#,y#,z#)+2.6 PositionEntity dude,x#,terra_y#,z# RenderWorld Flip Wend End