How do I move an object in a arc movement, im trying to make this arc move without physics (if possible), there I made an ilustration with example values on it, remembering that the Y start position sometimes isn’t the same as the end Y position:
Hi! This other post might help:
Hi,
for another solution you need the lerp-function and some math for calculating the parabola.
For your given values, the events can look like this:
First, you need an object variable t, which will be the interpolation factor in the lerp function. In this case it will be TimeDelta().
For the x position: lerp takes three values, in your case (1) start x-position, (2) end x-position and the third value is the interpolation factor which is for you (3) the object variable t (“ball.t”).
For the y position you do the same: lerp(y-start position; y-end position; ball.t).
This would move the object in a straight line but you want a parabola. For a symmetric parabola, you can use this formula:
4 * ArcHeight * ball.t * (1 - ball.t)
Combine both and you get a symmetric parabola movement:
lerp(y-startPoint, y-endPoint, ball.t) - (4 * ArcHeight * ball.t * (1 - ball.t))
You can change the ArcHeight value as you like and if the y-start or endPoint changes, you need to store it in a variable and put this in the formula instead of hardcoding the values.
If you want to change the time scale you can divide TimeDelta() by a different value than 2.
Disclaimer: I wish I would be skilled enough to come up with stuff like this myself, but the parabola formula and adding to t TimeDelta() / 2 is from ChatGPT.



