Hallo,
I have following problem:
I want to move an object between point "a" and point "b" (simple linear axis) in space, which works fine so far. I am getting the mouse position, setting it to zero and then feed the change as translation for the object. So when you move mouse to the left, the object goes left... you move to right, the object goes right. The further away the mouse is from zero, the faster the object moves. All that works fine, but I can't find a way to limit the objects movement.
I need to be abel to stop the object from moving after some distance. Imagine a simple slider interface for volume, or something else.. it can only move between 2 points. Once it reaches his limit, he needs to stop there, but still be abel to move back if the user pulls the mouse in the opposite direction.
I think the main problem is that I am not using Set Position, instead I am using Translate, which is works perfect for what I want... I just have that limiting problem. Maybe someone can give me a hint how to fix that.
Thanks!