Hello, i recently made a post about a black hole i made in gdevelop, but i was wondering how i could make the movement for falling in the black hole? like this image

any help is appreciated!

Hello, i recently made a post about a black hole i made in gdevelop, but i was wondering how i could make the movement for falling in the black hole? like this image

any help is appreciated!

try

x pos = center.x + sin( t ) × r

y pos= center.y + cos ( t ) × r

where t is timeFromStart × rotationSpeed and r is radius - timeFromStart × radiusSpeed

center x being center of the black hole?

yes. Trigonometry can be used for a lot. You can move something smoothly back and forth with pos_x = sin(t) × r

sin returns values from -1 to 1

1 Like

just invert a value like r x or y to make it go the other way. -x instead of x