Animated Tile Collider

I have added an animated spikes tile in Tilevania. It basically pushes the spikes up through the floor into view.

The issue I have now is that the collider exists even though the actual spikes are not showing. I have changed the physics shape on each individual sprite used to create the animated tile. I thought the tilemap/composite collider conforms to the physics shape, this is not happening.

What I would like is for the player to be able to occupy the grid space while the spikes are hidden. But die if it collides with the spikes as they protrude through the floor. Anyone know a way for this to occur?

Hi,

Check if you can enable/disable the collider in your animation. In the “Idle” state, the collider is disabled. In the “Attack” state (or whatever you named it), you could enable the collider. Depending on your animation and states, you could do that in one animation. It’s up to you. Just make sure that you enable and disable the collider at some point in your animation.

Did this help?

I was using an animated tile in the tile palette for the hidden spikes. I was hoping for a solution that didn’t require adding a game object to which an animator had to be added. It works, just not what I was looking for.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms