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.

I have noticed that TOK_CreateTokCollider has a flag for collision but TOK_CreateRBCube has no flag not sure how to use the collision flag in TOK_CreateTokCollider or even how to get a result from it, anyway I have thought of a possible workaround using Blitz collisions

MyMesh=LoadMesh("MyMesh.3ds")
TOK_CreateRBCube("Object",MyMesh,0,0,0,0,0,0,2,2,2,6,"",255,255,255,1,0)
Map1=LoadMesh("Map1.b3d")
TOK_CreateTokCollider(Map1,"",Map1,0);,Erase=False
freeentity MyMesh

CollisionFlag=createcube(0)
scaleentity CollisionFlag,2,2,2
entityalpha CollisionFlag,0
Repeat
;keep the CollisionFlag entity at same position as the Rb ;object
CollisionFlagX#=(TOK_GetRBY#"Object")
CollisionFlagY#=(TOK_GetRBY#"Object")
CollisionFlagZ#=(TOK_GetRBY#"Object")
positionmeshCollisionFlag,CollisionFlagX,CollisionFlagY,CollisionFlagZ
Until KeyHit (1)

and just check for collisions with the CollisionFlag mesh and the map1 blitz mesh,I have not tested this and am assuming that when you create a Tok_CreateTokCollider mesh that the original biltz mesh is copyed and is still there. anyway this is just a quick idea I will test it tonight.