Wheels Or Engines

Discussion in 'Buildbox 3.0' started by mxstudios, Oct 28, 2018.

  1. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    Hello Boxers!

    I'm just trying to get used to 3.0, and have managed to get some interesting things done with scripting, but was wondering if it's possible to model a Drone with 4 engines. I see how I can have an object connect to another, but how can I have 4 objects connect to the same body, and have the body and other objects dragged around by the power of the individual engines? I assume it would be similar to 4 wheels on a car spinning at different speeds.

    I am pretty sure this was doable in 2.0.

    Again, am I missing something? For example, if i had 4 objects connected to the corners of a cube and added upward velocity to the ones on the right, I'd want that to tilt the whole set of objects and push it in the appropriate direction.

    I am finding ways to fake it by adjusting the settings on the actual body, but it isn't the same I don't think.

    Thoughts?
     
  2. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    I stump the best of ya?
     
  3. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    I don't know if it's stumping or not. It's going to take experimentation, and while I'm really interested in the results I just don't have the time to mess with it. It would not be hard to have multiple independent rotation "pods" attached to a main object, and you could apply varying velocity to each of them....but I have no idea what affect that would have on the main object. Great question.
     
  4. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Now you've got me thinking, damn you. :) I think applying different vertical velocities to the pods will just be additive and will make the main body go straight up/down at a total of the velocities(or at the highest velocity). I think to make it work as a quad-copter, you'd need to write your own function that tracks the different velocities input by your control, applies them to spin the propellers faster or slower just for looks(don't apply velocity to the spinning prop pods), and calculates a vector based on those 4 velocities that you then set for the main object, which would move it around. Hope you're good at math.
     
  5. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    :)

    Thanks for your input. I've been doing a lot of experimenting, with the examples and API docs that are currently available. Hopefully when Beta 4 comes out there will be more updated docs. I have also been creating scripts for two on-screen joysticks since which has been interesting. Will share when it's stable.

    Throw any other thoughts this way!
     
  6. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    That I would definitely like to see. I figure they must be coming out with the ability to have multiple controls and designated screen areas for them, but I haven't heard anything about it.
     
  7. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    So now I am creating an Engine object, but how can I assign each one of them a different name or ID? There is no way to assign attributes to an instance without copying and changing the code?
     
  8. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    I'm not 100% sure what your problem is, but do you mean you want identical objects and the ability to ID them in a node?
    You can complete one engine, including associated node(s), duplicate it in the object list and name it differently from the first one...or name them all the same and use a node to set a variable with a unique ID in the init function. The API routine that looks for objects returns a list of all objects of the same name, so you could loop through those and look at the ID's you assigned each one.

    Let me know if I'm misunderstanding your problem.
     
  9. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    I'm complicating it. I thought I'd be able to create one in the object list and put 4 instances in the scene attached to the body and give them different attributes, the same way we can set the rotation and position. I'll just duplicate the objects as you suggested. I am a programmer and get uncomfortable duplicating the "Class" rather than the "Instance". I have to get used to the fact that this is a tool and not a development environment.

    Thank for setting me straight!
     
  10. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Yes, exactly.
     

Share This Page