S
S
Sergey Panov2018-06-28 15:46:15
Unity
Sergey Panov, 2018-06-28 15:46:15

How to create an object along the line of the finger?

Good day, friends. How to create a line (platform or any object) based on the coordinates of a finger on the screen? I want the player to create a line (object) of the same length and shape as he swiped his finger after swiping the player's finger. Can you please tell me how to do this or have some examples? The screenshot showed an example of a drawn line. How to create an object that is shown as a white line in the screenshot, based on the fact that it was drawn by the player?
5b34d8912cff6010541400.pngThank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2018-06-28
@select8

Read the documentation - everything is written there. If an algorithm is needed:
Handles the finger movement event
Stores the coordinates of the finger
Normalizes, inter/extrapolates the coordinates.
If necessary, we translate the screen coordinates into game coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question