I am trying to make a system like this. At the moment I am trying OnMouseDown, OnMouseEnter and so on to check for positions / matches and I am having reasonable success.
Getting a little confused as to what the best way to do it would be.
Should I use Input.touches or Mouse events or ?
Also how would it be possible to draw these lines. Should I use LineRenderer or prefabs being instantiated and destroyed.
Any general pointers to the best way to go would be a great help.
Well, if you want to use both touch and mouse input, I think it’s better to use touch protocol as it encompasses both if you use something like TKTouchkit by prime 31, I forget if the standard touch input in unity does both, but I use the touch kit and it does both. When you click the mouse, it is considered as a touch.
As for the line renderer question. I am under the impression that it is slow, but if you aren’t going to have a lot of lines, maybe that won’t be a problem for you and you could add a partical effect to it to get that glow. I personally just procedurally build my own mesh for things like the line you’re asking about to have more control over the result.
For future reference, you have 2 completely different questions here. It would be better to ask specific questions to help people help you and also to help others in the future who need to solve the same problem. You’re heading “how do you achieve this?” could apply to anything.