I’m trying to place objects into the game world at the current mouse position using Camera.ScreenToWorldPoint. It works well with an orthographic camera but not at all with a perspective camera. No matter where the mouse is on the screen or what I manually set the X and Y co-ordinates to (using Instantiate), the objects always show up in the same location.
Is there way of getting ScreenToWorldPoint working with a perspective camera, or is there another function or method that will give me the same results?