- Home /
Resize/rotate a rectangular cube based on mouse cursor position?
I'm sorry if this has been asked before, I'm new here. I searched a lot but couldn't find what I needed.
Basically, I want to create a gameObject (a cube) when the player clicks the mouse, and set a pivoting point at the initial click position. While pressing the mouse, I want to be able to make the other side of the cube 'follow' the mouse and be placed when the click is released; to form a rectangular shape.
If you have the time, please take a look at this game, which I want to replicate. In the game which I linked, the platform which is being created is invisible. I would like it to be visible when you are dragging it.
Thanks in advance!
Your answer
![](https://koobas.hobune.stream/wayback/20220612090310im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to disable collisions just for the cursor? 0 Answers
Cube Highlighter 0 Answers
Draw line on cube ? 2 Answers
How To Drag any Cube Using Mouse Click and Moved Only 1 Unit?? 2 Answers