EasyTok/Tokamak - how to detect collision?

Blitz3D Forums/Blitz3D Userlibs/EasyTok/Tokamak - how to detect collision?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This is a bit better but it is still not detecting a collision on every impact any ideas anyone mabey I need to play around with TOK_RefreshPhysic(.1,2)?

Include "Inc_EasyTOK.bb"

Const Balls=1,Maps=2

Graphics3D 800,600
SetBuffer BackBuffer()
Cam=CreateCamera()
PositionEntity Cam,0,0,-40

Global Light=CreateLight()
PositionEntity Light,0,50,-10

TOK_InitWorld(0,-.6,0,1000,100)

Ball1=CreateSphere()
EntityType(ball1,Balls)
TOK_CreateRBSphere("Ball",Ball1,0,0,0,0,0,0,1,.2,"",255,255,255,1,0)
FreeEntity Ball1

Global Map=CreateCube()
ScaleEntity Map,2,2,2
EntityType Map,Maps
EntityColor Map,255,0,0
PositionEntity Map,0,-20,0
TOK_CreateTokCollider(Map,"",Map,Maps,0); Set the collision type to maps

Collisions Balls,Maps,2,2

Repeat

UpdateWorld()

TOK_RefreshPhysic(.1,2)
TOK_RefreshEasyTOK()

RenderWorld()
If EntityCollided(TOK_GetRBMesh("Ball"),Maps)
TOK_ApplyImpulse("ball",0,.5,0)
EndIf

Flip
Until KeyHit(1)

TOK_FreePhysic()
End