- Home /
how to control the horizontal position of object in a 4 units wide plane?
Hi, I am using unity for my game project in which a ball is continuously moving with uniform velocity on z axis on a plane that is 4 units wide(on x-axis ) and is of infinite length (at z-axis), i want to control its horizontal position in such a manner that when i move the joystick axis to -1 or 1 it moves to -2 or 2 units respectively from origin at x-axis and it must stay there till the axis is released to 0, and must move and stay between continuous position points between -2 and 2 with respect to joystick axis -1 and 1. Please help. Thanks in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220613191412im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to move a sphere relative to its own axis? 2 Answers
How to access variables from an object based on location? C# (Pic inside) 1 Answer
How to place an object near N number of objects in order to avoid overlap? 0 Answers
Move object with Translate on X axis (with mouse) 0 Answers
Offset position to a target 3 Answers