How do I rotate a 3d external layout?

I am trying to make a fast-paced doors-like game, but I’m having trouble with making rooms turn. I am using external events to place the rooms, but all the rooms face forward, and I need them to turn when required. I’ve tried a bunch of methods, including linking, stickers, and parent-child rotation.

I have in-game pictures along with the specific layout I’m having trouble with and the code that manages room generation. Is there something I’m doing wrong?

I’m trying a similar thing, but with seed-like generating rooms, and I also have no idea how to do it.

I submitted exactly same thing while ago because I wanted to do the same thing

I only have ideas how it could be done but didn’t do it

  1. [Most popular response to mine] Each room as one object instead (which we both know sucks)
  2. Use “stick” extension and stick every object to a “rotation handler” and then rotate that (most likely to work the best, just never got to do it)
  3. Make each rotation a different layout (probably the worst option)

The third option actually seems like the best option LMAO.
I’m actually using that method for stage variants in one of my projects, and it wouldn’t be so bad if there were folders, or something to group external layouts. Since the object is the same resource, it doesn’t take any more time to load than it does the first time, so that’s why I actually (kind of) like this method.

The folders I agree, same should be done for scenes (but they don’t have it fsr)

But here’s the thing, if you edit one, you need to edit the rest too (which is tedious and annonying)

OK SO

The sticking method IS possible, problem is that I can’t seem to make them stick properly (after the layouts get created)

I’ll get back here once I figure that out

Worst thing you can do to yourself in gamedev is to get yourself stuck cause you think right way to do something
Is to do it as you would do it normally

Imagine mario game
Mario in collision with coin
Add 1 to coins variable delete coin

Seems simple and obvious
Mario dies and you don’t want to reset scene but bring back coins but how to do that?
There is a way to save their positions dynamically of course but

How about
Coin opacity = 255
Mario is in collision with coin

Add 1 to coin variable
Change opacity of coin set to 0

Mario dies and all you need to do is set coins opacity to 255
There goes your reset logic

I used 1 object to put other around it and then spin that object
In fact you can do exact same thing same way WITHOUT that object since there is same action to put objects around position

it needs to rotate individual layouts separately, not all of them at the same time, so pretty much what you sent, but it also has those center points created within those layouts

(I also sent what I figured out on discord btw)

And?
You could create layout OFF camera even off your game field
For example at Y -9999999999
And check if objects are below some Y point
If so set their variable to SOMETHING
And now you have means to target them as you please

Even something like giving them ID variables would do the trick

1 - Z is structure variable with no child vars


So now i can dynamically create vars in events with Z[“SOME NAME”]
I just need to go into condition/action if i want to set them to anything else than number

I don’t like clutter my variable window that is why i use this for tests
I strongly suggest copy/paste names of these variables between actions/conditions instead of typing them
So you avoid for example doing Z[“State”] and then somewhere else Z[“state”] which would be 2 different variables

2 - I have 5 layouts but you can create as many as you want
I named mine 1 2 3 4 5 so when you press 1 2 3 4 or 5 they are being created

3 - My crates are 100x100 and rooms are made of 7 of them so all math related to them rely these numbers

4 - I created 1st layout like in screenshot below where X and Y of center object is in top left corner of viewport so at position x0 y0


From that i just duplicated layouts and edited them
You only need to get 1st layout to work then you can make as many duplicates as you want/need

5 - Cartridge is object on which i start creating my rooms
Which looks like wall cause why not
And you will see it as soon as you create 1 layout

6 - When i shared link on discord to another user to my spin room logic (the one in my 1st message here) that user told me it works only cause all objects are in same distance from center object
So i placed Crate3 5 spaces to the left and 2 to the top from each layout to prove it will rotate perfectly fine with everything else
In case you will have same idea

7 - WASD to move and Tilde (button below escape) to reset scene

8 - When you place new layout it will be rotated based on where you placed last one

9 - That BoolVar is needed to block you from spamming deleting everything

10 - My layout objects


Have only 3 vars

CENTER OBJECT Crate2 CANNOT be in that group

11 - ORDER of everything you see is crucial for it to work
So don’t tell me it does not work if you cannot show me screenshot of exact same events/conditions/actions setup

12 - By default my player is facing right that is why you see me rotating it -90 and now all objects crate facing UP

13 - Dice is your room exit so you have better orientation which way you wanna have room rotated

14 - You could make array and place there names of your layouts
For example you have layout called Up
Then on called UpDown another called UpLeft and so go on
Then if you place them all under array you could still use what i have
But in create objects from layout set Array[Z[“Layout”]]
In case you don’t want to rename your layouts

Enjoy