Point-and-click move to tile
Rather than clicking specific objects to indicate the target for our AI-controlled agent, we can create a grid of 3D Plane
(tile) objects to allow the player to click any tile to indicate a destination for the AI-controller character. So, any location can be clicked, rather than only one of a few specific objects:

Getting ready
This recipe adds to the previous one, so make a copy of that project folder and do your work for this recipe with that copy.
For this recipe, we have prepared a red-outlined black square Texture
image named square_outline.png
in a folder named Textures
in the 15_04
folder.
How to do it...
To create a point-and-click game making GameObjects to a selected tile, do the following:
- Delete your 3D
Cube
,Sphere,
andCylinder
GameObjects from the scene. - Create a new 3D
Plane
object, scaled to (0.1, 0.1, 0.1
). - Create a new
Material
with theTexture
imagesquare_outline.png
provided (black square with a red outline). Apply thisMaterial
to your 3DPlane...