[Solved] Drawing an arc / moving an object in an arc?

Hello gdevelop community. Ive come a long way since the last time I was here trying to figure out how to calculate bounce angles, but Ive hit another wall and could use some help.

I am trying to move an object along an arc shaped path. Ive gotten it to work a few different ways, but each had their own issues or reasons why they are not the ideal solution. What i really need to know is how to express an arc shape mathematically, and how to apply it with the force function.

What i am trying to do is have one character be able to lift an object overhead and throw it along an arc shaped path (imagine a rainbow). The game has a sort of 2.5d top down perspective. Like an isometric view, but with north=up/270°.

I drew some .svg arcs with inkspace and plugged them into the curved movement extension and it worked beautifully, but while we see the object move along the path, the objects coordinates actually teleport to the end of the path instantly. Thats a problem because i have separate objects for shadows and also need to check for collisions along path in real time.

Unfortunately my laptop isn’t internet connected, so in lieu of a screenshot here’s a crude drawing of what I’m trying to do.

Sorry, got it. Was looking for quadratic equations for a parabola. In case anyone else needs it and finds this in the future:

http://jwilson.coe.uga.edu/EMT668/EMAT6680.Folders/Barron/unit/Lesson%206/6.html

3 Likes

A much simpler way to do this is to apply a force on the x axis and tween the object on the y axis (since i couldn’t get 2 tweens on the same object simultaneously). I was able to create realistic 3d parabolic movement in a top down perspective by using shadows. i.e. if the parabola is moving left to right along the x axis, shadow stays pinned to the x axis, object is tweened along the y axis. This creates the illusion of a height dimension.

1 Like