Hello,
I want to test if an object no longer has any activity on its y axis, so that I can trigger a game over functionality.
Basically, the object gets launched via a point effector. The object then bounces around, and when it no longer moves anymore on the y axis I want to Debug.Log(“GameOver”);
I can only test whether if the object is not moving anymore on the y axis, not the x. Because I have a surface effector on the ground object that constantly pushes the object forward. Hence, I only want to test for if the velocity on the y axis == 0;
I ended up setting up a system where it tests for zero velocity in the update method, triggers a IEnumerator timer, and checks is the transform on the y is equal or less than that of the ground. And that worked! Thank you both for helping me. I’ll mark this thread as solved.