COLOR CHANGE VIA MOUSE CLICK
RAYCASTING | GAME BASED EXAMPLES
Last updated
RAYCASTING | GAME BASED EXAMPLES
Last updated
OBJECTIVE: Create a program that changes the color of a cube upon the user mouse clicking on it
Cube GameObject
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.