EntityCollided

Blitz3D Forums/Blitz3D Beginners Area/EntityCollided

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

This is a simple problem that can be solved. Many people make this mistake, including myself.

Look at this line:
If EntityCollided(x\mesh, z\mesh)


If you have collision types assigned to your meshes with "EntityType," you must put the collision TYPE for "z\mesh" instead of the actual mesh.

Const XMESH_TYPE = 1
Const ZMESH_TYPE = 2

For i.map = Each map
    EntityType i\mesh, ZMESH_TYPE
Next
For o.Bullet = Each Bullet
    EntityType o\mesh, XMESH_TYPE
Next


Then you would replace this line:
If EntityCollided(x\mesh, z\mesh)

WITH
If EntityCollided(x\mesh, ZMESH_TYPE) ;ZMESH_TYPE could also be "2"