I have multiple sprites, like a brick wall.
I want to rotate the first left bottom sprite/brick and all the others bricks of the wall like in this picture with any rotation angle from 0 to 360 :
The wall should be the same after rotation, just like rotating a photo of sprites instead of pixels.
What’s the easiest way to do that ?
I tried to put all the sprites in a layer and rotate the camera but i lost the collisions.
I tried to rotate each sprites but the center of rotation is the center of each sprite so i need to rebuild all the wall after rotation.
A single sprite is not possible. Maybe the explanation of my problem was too simple with this “wall” thing, i wanted to do simple because my english is bad. There are multiple sprites stuck together. They all can move and change size, animation,… It’s quite complex, like if i wanted to rotate a platform of a plateformer game with sprites on it. That’s why at first i tried to put all that in a layer. I’m looking for a container or a mecanism like that to rotate all sprites in 1 move.
You can also use the “parent” sprite with points. Then assign the x and y coordinates of the “children” sprites to the points. As a result, when you rotate the “parent” sprite, the coordinates of the points, and, accordingly, the coordinates of the “children” sprites will be saved. Seems to be the easiest way
You could check out this example that has a parent and a child. And you can use A and S to rotate both. The child will be rotating around the parent, GDevelop 5
Thx MrMen, i did a quick test it’s working when sprites are not moving. Now i need to figure out how i can deal with moving sprites, thx again.
Thx Midhil too i will try the parent thing too.
Ah, the old shifting goal posts/scope creep . This thread has given you a few ways of doing it, it’ll be a matter of figuring out which one is most suitable.
Your explanation was fine. The only downside I see with the points method is that it doesn’t scale - it’s limited to however many points you define in the editor.