- Home /
How to create a line by mouse but in x and y direction only
i am working on a game which is basically coin matching game. i wanna draw
Step1: user starts as mention at image step2: user starts drag and as user drag line start draw but user can only draw in x,y plane direction not in angular direction as mention in image. step3: when user reach at specifice cell as shown in figure the line exits remains if it discountinues for some resons it disappears.
Look into LineRenderer's. It will draw a line between two points from Vector coordinates. You should be able to make this do exactly what you need.
Your answer
Follow this Question
Related Questions
Is it possible to make guitexture above gui.drawtexture? 0 Answers
Line Collision Detection for 2D Game 1 Answer
Trying to drag an object with touch using Rigidbody2D.MovePosition 1 Answer
How to make a player health script and enemy damage script that is easily changed? 2 Answers
Move Object by dragging (mobile) makes the balls fall from the cup 1 Answer