Hello im new to unity and what im trying to do is instantiate a object with opacity so it is kind of see through at my mouse on click then i want the “ghost object” to follow my mouse until i click again and the object is placed. can anyone help me
First you need Input.GetMouseButtonDown to detect a mouse click. On the first click, Instantiate your object, then constantly update its position, until you detect another click, then leave it alone. Possibly change its material so it is now opaque.
For the position, you need to use Camera.ScreenToWorldPoint or Camera.ScreenPointToRay to convert Input.mousePosition so you get a point in the game world.