Unsolved Wheel Adapter / Spacer

Discussion in 'Mod Support' started by MapleBacon, Sep 26, 2016.

  1. MapleBacon

    MapleBacon
    Expand Collapse

    Joined:
    May 28, 2015
    Messages:
    34
    How would I make a mod that acts like a wheel adapter/spacer? I would like to be able to attach it as wheel and then attach a wheel on the other side of it. it would have adjustable wheel spacing (with a tuning slider) and can convert say a 4 lug hub to a 5 lug. I want to make it as a proof of concept for now. If it works, I want to know how to model it to stretch the adapter model with the spacing the user sets.
     

    Attached Files:

    • spidertrax-wheel-adapter-5.jpg
  2. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,619
    I've been wanting to whip up something like this for a long time now. The prospects are not bright. The current implementation of nodeOffset is all absolute, not relative - there is no "cumulative" nodeOffset as we move through the slots. The best which you could currently implement would be something which tampers with trackwidth.

    It is not possible to just have an item which slots into the "wheel" slot (under the hub) and provides some offset and a "new" wheelslot which is added to the existing offset.

    Actually, maybe it would still be possible if you did something like this:
    Code:
            ["pickup_hub_F","pickup_hub_F_6","Front Wheel Hubs", {"nodeOffset":{"x":"$trackwidth_F"+0.1, "y":-1.463, "z":0.46}}],
    
    The problem is that this will be far from universal. As we can see, while X is based solely on a variable in the original code (I added 0.1m to that value arbitrarily as an approximation of a 'spacer')... the Y and Z are arbitrary values based on the vehicle and suspension type installed on the vehicle.
    EDIT: see post #8 in this thread - this doesn't work.

    Basically I'd say skip it for now unless someone else chimes in with better knowledge of JBEAM / BeamNG.
     
    #2 torsion, Sep 26, 2016
    Last edited: Sep 27, 2016
  3. CreasingCurve

    CreasingCurve
    Expand Collapse

    Joined:
    Jan 19, 2016
    Messages:
    941
    I posted something before but it seems to have disappeared. It was basically along the lines of just making a new wheel that would suit a stanced car or just extending the suspension arms but even for experienced jbeamers and modellers i can't see this being an "easy fix" considering you would have to model or extend the models of the suspension arm and then change the spring stiffness and ride height along with it.
     
  4. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,619
    This is part of my point - that's not how it works. You are thinking of how things work in real life - "relative" positions. No matter how much longer you make the arms in BeamNG currently, the wheel will still be placed absolutely instead of relatively... so you'll end up with arms just sticking through the wheels!
     
  5. CreasingCurve

    CreasingCurve
    Expand Collapse

    Joined:
    Jan 19, 2016
    Messages:
    941
    But isn't the wheels position relative to the wheel hubs. If this is so and you moved the wheel hubs according to the location of suspension arms to be in the place they should be, the wheels would them have more offset and sit out more. Correct me if im wrong
     
  6. MapleBacon

    MapleBacon
    Expand Collapse

    Joined:
    May 28, 2015
    Messages:
    34
    So would it be easier to modify each car to have extra hubs or would it be easier to make a universal hub that fits any car. How would i go about either of these. Im very new and have no idea where to start with jbeam stuff
     
  7. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,619
    While the wheel's position is based on the position of the hub, the hub's position is not based on that of the suspension. Those are separate parts in separate slots which must be independently adjusted. The suspension would be modified by widening the jbeam, while the hub would simply have it's nodeOffset adjusted.

    You'd be modifying two separate parts/things... and you'd want to use a different hub slot for your new suspension since if the existing hubs were slotted into the 'wide' suspension then the suspension would protrude through the hubs. Same thing with the reverse - you wouldn't want to slot your new hubs into the old 'normal' width suspension because they'd be sticking out without a mesh and the jbeam would be distorted (weak) due to the increased offset without proper structure.

    Universal is certainly out of reach and none of this will be "easy" in my opinion. Just moving the hubs outward won't get you far IMO.

    If you're a beginner and want to get into modding, please take a look at my posts in this thread - "How to create custom gauges". Read the whole thread if you like, but the meat is that I'm recommending playing with some other interesting mods first to get started. That's posts #6/8/10/etc - I strongly recommend that you go that route - you'll be able to do some exciting things and probably get a better feel for what this mod requires at the same time.
     
  8. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,619
    I've been informed that math operations cannot be done on jbeam variables. So the addition I showed in that code block is simply not possible right now. The support for variables does exist of course (that's how the "tuning" stuff works), but we can't add, subtract, multiply, and etc within the jbeam.
     
  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