Hi,
my goal is it that my characters gravity is -1 or something while i collide with a box.
So… I created a box collider and check if its my player who collides with it. if yes, i set the bool “triggered” to true:
When my player dont collide with it anymore i set the bool to false:
Ok. Thats the basics.
Now i take the gravity of my player and multiply it by -1.
I thought its a simple solution to make a “while triggered is true” - loop but my problem is:
- the result is an infinite loop error
- When i remove the while-loop it only works 1 time. He just fall thru the Box collider when i reached the end