How do I select a sphere/named object, change its material to a different color and move it to another area of the terrain depending on where I press my mouse?
this is actually 3 questions :
1/ Raycast and then store a reference to the gameObject of the hit collider
2/ set the renderer material
3/ raycast to find the hit point. transform, move or lerp to that location
Unity Scripting References :