Pause a slider on it's current value at a specific point in time after submit

I am working on a function mini golf and I want to have a moving obstacle. I have made it so the ball will stop rolling when it strikes an obstacle, but if the obstacle continues to move afterward, the ball path will eventually be clear and the ball will continue to the hole. Everything I try to do ends up with a circular reference. I would love some assistance, as I have been banging my head against the wall for months on this one. Thanks

So, I’m thinking you might need to use a capture to make this work, and do a predictive calculation for whether the ball will hit obstacle p. (I don’t really want to decipher your variables).
In your button, capture the bottom of obstacle p. In your graph CL, use lastValue to calculate the location of p_bottom when the ball reaches p_left. Then, in your graph, instead of having f(x) display directly, use y=f(x) but with a domain {x<c}. Conditionally, set c to p_left if the ball is going to make contact or the end of the grass if it doesn’t.

Thank you! I was able to get it to work. Now I can keep going. Wish me luck!

1 Like