How do I do this?

I’m making a game where I want to click a wire and it will change to be cut. How would I go about doing this? I already have my sprites for RedWire and RedWireCut. I have heard about RayCasts for determining if a GameObject() has been clicked or not. Any pointers?

Is this a 2d or 3d game? Most of the time for just clicking on something there are easy ways of handling this. Can you give more info. Does the wire need to be cut where clicked or just it’s cut or not cut(cut mark is just part of the art)

2D game, the wire needs to go from UnCut to Cut when it is clicked :slight_smile:

Ah, ok. so if it’s just a sprite change, you could have a script on it for the mouse clicks

Personally though, I prefer the ipointer events,

https://docs.unity3d.com/Manual/SupportedEvents.html

I just found them to work a little better for me. Hopefully that gets you in the right direction to start.