I’ve created a simplified version of problem I am having.
When slider is moved, it updates the position of the ground, and then depending on that position of the ground sphere position will move.
How I’ve done that (and I have specific case scenario in my project where this seamed like a good approach) is that I a take maximumWorld.y position of the boundingBox of the ground. And I want to snap position of the sphere to that value.
Now, what you can experience is the same issue I am having in my project, when sliding up, sphere goes bellow ground, when sliding down, sphere goes above ground. Is there a way to avoid this, and to keep sphere always above ground. Why is it even swapping positions? In the case of the ground plane maximumWorld should always be in the “middle” of the mesh, or am I wrong?
Is there any other way to keep one mesh on top of another.
PS: comment line 13 on first run