Question by
joni_ahvenjarvi · Feb 12, 2020 at 01:46 PM ·
collisiontrigger2d-platformer2d-physics2d platformer
2D collision stops working if i have the object be a trigger,We're trying to make a 2D platformer, and having a trigger on an object removes it's collision. But, we need it to collide.
So, I'm currently trying to make a spike deal damage to the player. And we have managed to get that to work. Problem is that when i set the collider on it to be a trigger, the collider stops working and i just pass through the spike and take damage, instead of hitting the spike and taking damage.
Only when i remove the Is Trigger checkbox does it gain it's collision, but i take no damage. If i check it, then i once again pass through the spike and take damage...
I have tried looking on the net for help, and haven't found anything that works.
Comment
Best Answer
Answer by joni_ahvenjarvi · Feb 12, 2020 at 08:10 AM
Solved. Added a second collider, with one set to have Is Trigger and the other set not to have Is Trigger.