Spiral Movement

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

looks good but the movement goes backwards

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