1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Placing Barriers and adjusting their orientation

Discussion in 'General Discussion' started by B3_Burner, Jul 27, 2019.

  1. B3_Burner

    B3_Burner
    Expand Collapse

    Joined:
    Mar 13, 2019
    Messages:
    402
    EDIT-- Question removed.. solution found. See the last post on this thread.
     
    #1 B3_Burner, Jul 27, 2019
    Last edited: Aug 19, 2020
  2. audi32quattro

    audi32quattro
    Expand Collapse

    Joined:
    Nov 29, 2013
    Messages:
    10
    Same problem here!
    According to this old thread, we're doing something wrong, but I really don't know what.

    https://www.beamng.com/threads/how-to-save-a-vehicles-location-rotation.55118/

    I've spawned, placed and rotated about 30 'vehicles' (barriers and tirewalls) with the editor and saved the layout, but after restarting the game all of them are resetted, staring in the same direction parallely.
    When I open up the editor again and try to rotate any objects, it instantly jumps to the rotation that I have saved.

    It seems like the visual rotation gets overwritten until I try to rotate them, which somehow restores the saved rotation.

    What am I doing wrong?
     
  3. B3_Burner

    B3_Burner
    Expand Collapse

    Joined:
    Mar 13, 2019
    Messages:
    402
    EDIT: My angry rant removed. Ineffective, and irrelevant to the discussion. See the solution to the issue in the last post of this thread.
     
    #3 B3_Burner, Jul 24, 2020
    Last edited: Aug 19, 2020
    • Like Like x 1
  4. audi32quattro

    audi32quattro
    Expand Collapse

    Joined:
    Nov 29, 2013
    Messages:
    10
    Wow, that's a lot of anger.
    But I do understand your point.

    I tried to capture this in two screenshots:
    a random 'vehicle' after I start the game

    notice that the originally saved position is exactly where the brackets are.

    and after I've moved the object with whatever tool (in editor) it just snaps back to the saved rotation.


    I just don't get that nobody else is having this problem or not giving a flying fuck about it.
     
  5. B3_Burner

    B3_Burner
    Expand Collapse

    Joined:
    Mar 13, 2019
    Messages:
    402
    Your screen pics didn't come through (broken links), but that is exactly what's happening to me. All I can say is that so long as you're just wanting to position "fixed objects" and not cars that you can drive, save them as stationary objects ("static objects"). You do this by going to the menus in the upper right corner... not the pulldown menu with the car icon down the left side of the screen.

    Let me make some screen captures with boxes and arrows, showing you what I mean. Give me about thirty minutes to an hour, while I put my displays together.
    EDIT: Might be more like 10 or 11 tonight (UTC –0700hrs), when I post my screen captures.
     
    #5 B3_Burner, Jul 25, 2020
    Last edited: Aug 19, 2020
  6. B3_Burner

    B3_Burner
    Expand Collapse

    Joined:
    Mar 13, 2019
    Messages:
    402
    EDIT: Solution post. The whole thread comes down to this:

    Audi 32 Quattro,

    I'm soooo sorry it's taken me this long to get back to you.
    EDIT-- Additional Inclusion: Between trying to write a dissertation even longer than this, and then attempting to make a video describing the process-- but later deciding that the video was too long as well-- I've decided to write this below, with a few pictures included.

    I'll warn you... this gets wordy, but I went through a lot of experimentation to get to this point, so the results require in depth detail:
    Note that I really ought to learn how to do this in the new world editor, but this is the only one I know how to use proficiently now, so best I show you on what I know best. Eventually that will change.

    The two forum members you linked, ('DOWL' and 'Gigawert') who said use PreFabs were correct!
    You and I probably didn't know where to find the prefabs, function in the old world editor, to make the necessary changes.

    For the past year and a half, I went to the prefabs tab, under the library tab, in the scene tree, in the old world editor; and that's a dead end.

    Instead, this is what you do:

    1. Go into the regular "in-game" object adder-- by pressing Esc, Car Icon, menu of thumbnails and pick whatever you're looking for-- a barrier, car, bollard, fence, sawhorse, tire wall -- doesn't matter, if it's in the "in-game" vehicle menu, it will work! Spawn it into the game, the way you would any extra car or object you want to add to the game.

    2. When you open up the world editor, and look at the scene tree, they'll be listed inside the folder 'Spawned Vehicles' -- as Clone, Clone0, Clone1, Clone2, etc. -- depending upon how many you've added.

    3. The difference is, DON'T go into the World Editor with the intent of merely saving it inside the 'FILE/Save As' option, and then exit them in that state.
    When you come back in to check your added assets, they'll be gone... as I'm sure you're already aware. That's what's been happening to me. Apparently "clone" classifications are "current-session" objects, and cannot be retained after closing the session in which they were created.

    4. There's a MIDDLE/INTERMEDIARY step we've been leaving out! After spawning the object in game, go into the World Editor, and hit the icon-- that I've circled-- in the tool bar up top, that looks like a cardboard box, with its flaps open. It is titled-- "Make the selection a prefab".
    PreFabDiagram.png

    Bear in mind that in my picture, I skipped a step for simplicity sake so I wouldn't have to do it over again just to illustrate a step I can merely describe instead.

    Note that before the objects are prefabs with cardboard box icons... they'll still be clones with beamNG beam & node icons with three black nodes and 3 orange beams in a triangle. Only after you hit the button above and save the file I describe below in step 5 (and you change the name in the world editor)... will you see the name you give it as a prefab.

    5. As soon as you click this, a computer explorer box will open up asking where you want to save the .json file.
    prefabtitlesavebox.png

    Ignore the fact that in my example it opened up to a different map, and has a file path I had worked on last. Point is, you will first be given a choice to save it in the default path, which I think is some sort of temp file in your C:\Windows... etc. You can let it populate there, but I wouldn't, and let me tell you why:

    Because this is something you created, in sync with your map project... and if you're map project is saved in 'Documents\BeamNG.drive\levels', I think you really want the .json files for your prefabs (related to your project) in the same folder. That way, if there's something wrong with it, where you need to get to it quickly, you'll find it more easily. Just a suggestion... do what you want on that one. It's optional.

    6. As soon as you click save, that orange and black beam/node clone icon disappears, and is replaced with the cardboard box icon. Your item, has now officially been upgraded to a prefab.

    The advantages are now as follows:

    a. -- Now your objects will be solid and you won't have "ghosting" issues
    , (i.e.-- lack of collision properties, where you drive through them, instead of into them).

    b. -- Now your objects will remember the rotation you give them, without "snapping back" to East-West orientation for props objects, and North-South orientation for vehicles.

    c. -- Now your objects won't be missing textures (i.e.-- turning orange), or crashing the game.
    -- Vehicles won't be spawning without tires, drag racing wheelie bars in the rear windshield, etc. etc.

    d. -- Now you can chase your prefab vehicle in AI and crash it into a tree a mile away, and when you close the game and come back, it will automatically and always respawn where it was when you started the session, time and time again.

    e. -- Now you can hit the tab button and drive your prefab vehicle instead of your "thePlayer" car if you so choose.

    To conclude with what NOT to do:

    A) DO NOT, save your vehicles or other objects in the world editor as "Vehicle Objects"
    using the pulldown menu in the "World Editor\Scene Tree\Library\Level\BeamNG\Vehicle..." path. This is a 5 lane interstate freeway leading to the primrose path of unadulterated disaster!!!!
    VehicleObjectsave.jpg

    This is where you and I have been having objects that snap back to original direction orientation -- that they natively spawn in, and unless you change them back each session, you will have to deal with this time and time again. You may also run into textures missing, wheels missing, etc.:

    B) DO NOT, save your vehicles or other objects in the world editor as "TSStatic Objects", using the right side file box containing files to click on, in the "World Editor\Scene Tree\Library\Meshes\Art\Shapes\misc for fixed objects..."
    TSStaticbarriers.jpg

    OR in the
    "World Editor\Scene Tree\Library\Meshes\[double left arrow (beneath the word 'Meshes')]\[slide all the way to the right of the field]\[vehicles folder]\[files next level down]..." path route:
    TsStatic.jpg

    This is where you start with collision free cars and objects where you can pull up on the blue Z arrow, and hang things hang in midair, because they are weightless and have no gravitas. I mean... if that's your thing... knock yourself out, but you'll have many other problems to contend with in the process:

    Sometimes stationary objects can be made collision-solid in a TS state, but cars can never be solid and collide-able in this state. Unless you want to drive through them all day long, this is a poor choice.

    Texture loss and odd things happening with cross models of a car can make for strange things. (Like a Gavril Bluebuck with no textures, but two B-pillars and 3 door handles... because somehow the coupe and sedan models got combined in the TSStatic conversion.
    ----

    Back to Prefabs:

    Finally, someone said they used prefabs to make their cars stand up on end to make a car bowling alley. Well since they have solidity and fall to the ground, I don't know how they managed that. Cars can stand suspended in mid-air, if you create them in the World Editor as TS Static Objects, but as you've probably determined yourself, that's an option that can lead you down the rabbit hole of disaster in a big hurry.

    I know this is not a complete guide, but I hope it helps. If you have further questions, feel free to ask.

    One more item, you may find this to be helpful. It's a .pdf file of my outline that I was using to make my video. The video didn't work out, but the outline is a script you can maybe follow with a bit more ease.
    CreatingStationaryObjects.pdf

    Good luck.

    -- John O.
     

    Attached Files:

    #6 B3_Burner, Aug 19, 2020
    Last edited: Aug 19, 2020
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice