Place Object on Surface?

Hello!

I am intrigued and confounded on how to place an object directly onto a surface while in-game, preferrably with an individual mouse click.

Are there any ideas or input that could be given to assist me in this goal?

Thank You

This is a duplicate of your tower defense question, but I actually prefer it because it is more general.

Think through the process. You’re going to need to learn about Mouse clicks. About finding where the mouse clicked. Now you have a location. Now you’ll need to learn about Instantiating objects (probably Prefabs, so learn about those as well).

Google around. There are numerous examples of all of these things.

First you have to check if the mouse is pressed using the Input class, then you have to make a raycast from the camera to your terrain (your map) using the Physics.Raycast class. Note that your map need to have a terrain collider atached to your terrain or the raycast will hit nothing. Then you have to instantiate a object from one of your prefabs a place it where your raycast hit.