# DMCA'S Sky

Heyo!
I’m think of making a game like this:
asmb.itch.io/dmcas-sky
And Lizard helped me with some physics, however I’d like it to be a close up camera slightly round world like this one.
Thanks,
Wombo combo

The trouble with remaking this one is that it seems to me even the camera follow the rotation of the player and it is something you can not do in GDevelop. You can not rotate the camera.

Or maybe the player doesn’t move really but rotate the platform (the planet) below the player.
If that’s the case, you can checkout my parenting example:

The mathematical one. You can use that to make the planet the parent and all platforms around the planet a child and instead of moving the player, rotate the planet below the player and all the childs (platforms) going to rotate with it and make the impression you are moving around the planet but really you don’t. The planet is rotating below you.

I don’t think it would be a practical way of doing it but can be done this way. Otherwise you need to keep calculating the orbit of the player object around the planet by taking in to account the size of the planet and all the platforms on different heights around the planet which seems even more trouble to me. But then my math skill is pretty basic so maybe it a lot easier than I think. The rotation of the camera would be definitely a problem though.

@ddabrahim: I thought exactly the same: [url]Round and About]
Also, you can modify the camera angle easily, there is an action to do it for native and web

@wombocombo: If you want the camara to be closer, change the zoom, or make the world bigger, if you zoom on a circle a lot (circle with infinite radius) it approaches to a line

lol I guess I should refresh my memory what events are available in GD

I tried zooming in on the character, and it was a (mild) success! However, is there a way to just make rectangular platforms in the shape of a circle and have the character’s walk around the “globe” like a circle?

You can make the platforms rounded so they make a perfect circle one aside the other, editing their collision mask to add more points to fit the curved surface, or making the platforms thiners can help you to get a more precise circular world.
There is a “block_width” variable or something like that in my example, it’s an approximation because the platforms are rectangles, and generate a world with an extra platform or a missing one. With circular sections as platforms you don’t need to approximate the platform width, you can know it exactly as the arc length = radius*angle, with radius = the distance from the center to the platform surface, and angle = the angle determined by the platform section.

In other words, you can try to make circular section platforms (images and collision masks), with a defined radius and angle, and update the platform width, world radius, and other variables in my example to get a more accurate world

I did what you said, and also, I changed the gravity force/vector to fit where the character is walking, similar to the “GoLeft” attribute.
For example, once he walks off one of the mini squircles, it updates to go to the next one without trouble B).
While I have your attention, is there any way to make the character teleport to another block?
Thanks!

I can’t make the maths now, but the idea is to get the angle of the destination block from the world center with the atan2(dy, dx) function, where dy = platform.Y() - center.Y(), and dx = platform.X() - center.X().
This angle is in radians, convert it to degrees with the ToDeg(angle) function.
Now you have the angle of the block, you want to put this block at the top (so you are over it), the up direction is -90 = 270 degrees, so you have to rotate the whole world 270 - block angle.
There could be problems if you mix negative with positive angles at the moment of the last subtraction, try to get all the angles in the range 0-360.

In summary, get the angle of the destination block, and rotate the world so this block is at the top

EDIT: I’m checking my example and you don’t have to calculate the angle again, just use the angle variable that every rotable object has.