Hello, I’m looking for a way to display the character and his path. The character is the point. The path is the line. Tell me what tools are better to use to connect these two objects and achieve the following result: A point moves in a straight line, if I change the position of a straight line then does the point react to these changes?
Red - my character, green path line.
@strela2737
“A point moves in a straight line, if I change the position of a straight line then does the point react to these changes?”
Based on the image you attached, your explanation makes no sense to me - do you want to replicate the path created by Sin/Cosine, or something else? It definitely doesn’t create a straight line.
A picture for example, I understand how to make the character move along the path I need, but I don’t know how to draw his path in advance, and if I change the x, y of the sine or line, the character will immediately accept new coordinate values for his path, something like this https://www.instagram.com/p/B3PfhkWoyu7/?igshid=1f3o2hvf4rl1n
I think you need to create a mathematical formula or equation to plot x and y based on some value like time or position along some length.
Then render that plotted path with custom mesh, line renderer or shader perhaps. Or look into some asset in store to do this for you.
Every time you change the values or show new part of the curve not plotted, you need update the visible curve area at least. Then you can also place the player with the same data.