I\'m trying to move a object to the mouse position. But it\'s giving me large x value like 300 but at that place the pre placed object\'s x position is -4.
The conversion with ScreenToWorldPoint is straight-forward for 2D Vectors:
ScreenToWorldPoint
Vector2 screenPosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y); Vector2 worldPosition = Camera.main.ScreenToWorldPoint(screenPosition);