None. |
Clears the collision information list. Whenever you use the dxCollisions command to enable dxCollisions between two different entity types, information is added to the collision list. This command clears that list, so that no dxCollisions will be detected until the dxCollisions command is used again. The command will not clear entity collision information. For example, entity radius, type etc. |
; dxClearCollisions Example ; ----------------------- dxGraphics3D 640,480 dxSetBuffer dxBackBuffer() camera=dxCreateCamera() light=dxCreateLight() sphere=dxCreateSphere( 32 ) dxPositionEntity sphere,-2,0,5 cone=dxCreateCone( 32 ) dxEntityType cone,type_cone dxPositionEntity cone,2,0,5 ; Set collision type values type_sphere=1 type_cone=2 ; Set up sphere collision data dxEntityRadius sphere,1 dxEntityType sphere,type_sphere ; Set up cone collision data dxEntityType cone,type_cone ; Enable dxCollisions between type_sphere and type_cone, with sphere->polygon method and slide response dxCollisions type_sphere,type_cone,2,2 While Not dxKeyDown( 1 ) x#=0 y#=0 z#=0 If dxKeyDown( 203 )=True Then x#=-0.1 If dxKeyDown( 205 )=True Then x#=0.1 If dxKeyDown( 208 )=True Then y#=-0.1 If dxKeyDown( 200 )=True Then y#=0.1 If dxKeyDown( 44 )=True Then z#=-0.1 If dxKeyDown( 30 )=True Then z#=0.1 dxMoveEntity sphere,x#,y#,z# ; If spacebar pressed then clear dxCollisions If dxKeyHit( 57 )=True Then dxClearCollisions ; Perform collision checking dxUpdateWorld dxRenderWorld dxText 0,0,"Use cursor/A/Z keys to move sphere" dxText 0,20,"Press spacebar to use dxClearCollisions command" dxFlip Wend End |