Hello! I’m totally newbie.
Thank you in advance for answers!
I need to make a control system with dragging fingers on a screen and curves.
How to make curves that depends on where I hold my finger on a screen in exact time? Making curves isn’t really hard, but how to make them change due to player’s act?
How to separate code in to parts for the purpose of control. Like:
If you want to draw a preview of a player’s trajectory from an input I suggest you to use physics formulas, that depends on the type of the physic used in your project. Once you got an appropriate function that returns the position of a player after t time, you can create multiple points in the given position, each one in a fixed time step.
For example if you’re using cinematic with a g gravity:
finalX = initialX + initialVelocityX * time
finalY = initalY + initialVelocity * time - g * (time * time)
To make sure you undestand, or that this is an appropriate method look for your needed formula.