- Home /
Move a cube with mouse relative to the camera rotation
Basically what I want is to mimic how you can move objects on Unity in my game. For example in Unity you have the following system:
In this system you can move the cube dragging the arrows and the drag movement will be relative to the mouse coordinates X /Y and the camera rotation.
My problem is make it relative to the camera, for example if I looking to the cube in it front and I want to move it with the X arrow to the right the drag movement will be in one direction and if I looking the cube in it back the movement will be in another direction.
How can I make the mouse dragging relative to the camera orientation?
Your answer
![](https://koobas.hobune.stream/wayback/20220612061955im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Mouse/Wacom stylus drag not working. 1 Answer
Dragging movement Speed 1 Answer
Dragging camera around object using mouse issue 0 Answers
Top down movement and rotation 2 Answers
How to select one prefab from more ? 0 Answers