Hello everyone,
I want to turn on gravity for platform, if player step on it, because that platform is trap. But I don´t know, how to do it?
Here is a code:
private float time = 2f;
void OnTriggerEnter2D(Collider2D col)
{
if(col.CompareTag("Player"))
{
}
else if (col.CompareTag("Floor"))
Destroy(this);
}