Whats a good way to make a sprite move in a parabola?
Offline
Well, a parabola is basically a trajectory of an object that is being accelerated, right? So one way to do it is to have variables called "X velocity" and "Y velocity", and in a forever loop move the sprite according to the velocities. In a separate script, simply continue decrementing the Y velocity by some constant.
Alternatively, use the equation: make the sprite always "set Y to" the square of its X position, for example.
Offline
Another way is to go to the sprites costume, and set the center to the very far right. Then, as a script turn it to the right to ark it!
Offline
or you could use trig...
Offline
this is how the first thing Hardmath123 suggested would look:
when [space v] key pressed glide [1] secs to x: [-100] y: [-120] set [x speed v] to [10] set [y speed v] to [50] set [gravity v] to [-5] repeat [21] change x by (x speed) change y by(y speed) change [y speed v] by (gravity) endyou can do something similar by defining just a time variable and making X proportional to time and Y proportional to time * time:
when [space v] key pressed glide [1] secs to x: [-100] y: [-120] set [time v] to [-10] repeat [20] change [time v] by [1] go to x: ([10] * (time)) y: ([180] - ([3] * ((time) * (time)))) endthese are like animations of jumps.
Offline