Detecting Collision with TokamakBlitz3D Forums/Blitz3D Userlibs/Detecting Collision with Tokamak
| I am trying to figure out collisions of rigid bodies with a static mesh. is this possible at all? does anyone know?|
i have been trying to get collision-data with materialIDs too mut did not succeed.
i load my level with botbuilders TOK_AddMesh() ... commands as a static mesh and i want to detect when the rigid bodies hit my level. so i thought this must be a common problem, isn't it ?
| I believe the collision ID so a static mesh is -1. It's been a while. |
| hm. i tried all of that. could not get any result yet.|
can anyone show me how to test this?
i tried this:
; --> Collision Check If TOKSIM_GetCollisionCount() > 0 For c = 0 To TOKSIM_GetCollisionCount()-1 DebugLog "A >> " + TOKCOL_GetCollisionIdA(colbank, c) DebugLog "B >> " + TOKCOL_GetCollisionIdB(colbank, c) Next Endif
| Have you assigned collision IDs to the bodies that are colliding with the static mesh? |
| This section of code worked for me -|
| thx vorderman, i tried this code. but it does not detect my static-mesh either.|
it detects all other collision-objects but not the level-file i loaded.
well finally i am using blitz3d "linepick()" to detect collision between level- and player-mesh.
not as good as i wanted. but it works at last.