Hi~
I have an object (Player) which will only follow the mouse.x axis~
The y axis is a fixed value because I don't wanna to move up & down~
But I want the object move just within a range~
For example, I set a x axis range between 100 and 400~
So that the object will only move within this range~
Even if my mouse axis is over or less than this range~
In detail, let's assume that my mouse is currently at x axis 500~
But the object will still stay on maximum x axis 400~
When my mouse get back to x < 400, the object will follow back~
Same as above, let's assume that my mouse is currently at x axis 30~
But the object will still stay on minimum x axis 100~
When my mouse get back to x > 100, the object will follow back~
How can I do this, I try a whole day still haven't figuring out~
I thought if I make 2 invisible collision objects on left and right~
It will block the player going out from the range but it won't work~
I think is because solid object won't affect mouse controlling object?
So... how can I do this?
Hope somebody know~
Really appreciated~ ^_^