Raycast with a mouse position!

I need to make a raycast, where to it hits an object when I click the mouse pointer on it and it plays an animation, and when it hits another object to play a second animation on the first object!


GameObjects can use the OnMouseUp function to detect when a mouse button is released while the pointer is over the object.

If that’s not what you’re looking for try searching for “raycast mouse” :stuck_out_tongue: There’s like a billion results.