Hi,
sorry, maybe it's a basic question but I'm not really a coder so I can't understand how to do :
I'm working with a tilemap and I want some bullets shot by the player to trigger when they entering any tilemap collision. I put a trigger on my bullets and the triggering works well (I check it with other colliders) but my problem is that I don't know how to "define" the tilemap. I found that the bullet triggers the collision with a chunk of the tilemap, but it seems very complicate to make a loop to check every chunks.
Here my code in the bullet script :
void OnTriggerEnter(Collider enteringCollider)
{
if (/*enteringCollider is a tilemap collider <-- this is here I don't know how to do*/)
{
Debug.Log("bullet touch map");
isDead = true;
}
Sorry for my english too, I'm french, and thanks for your answers.