COLOR CHANGE VIA MOUSE CLICK WITH MULTIPLE OBJECTS
Last updated
Last updated
OBJECTIVE: Create a program that allows users to ONLY change the color of cubes, despite having other gameobjects within the scene.
x3 Cube GameObject
x3 Sphere GameObject
Player Script --> Attached to Main Camera
After all game assets have been added, attach tags to the gameobjects.
Cubes should have the tag "cube"
Spheres should have the tag "sphere"
SCRIPTS NEEDED
Player Script --> Attached to Main Camera
PURPOSE OF SCRIPT --> Recognize when the user clicks the left mouse button and fire a raycast from the mouse position. Script should be able to access the object that we hit and modify it's color if that object is a cube.
MODIFY PLAYER SCRIPT FROM