Apply force instead of displacement with hydro

Discussion in 'Content Creation' started by mjc506, Jan 8, 2018.

  1. mjc506

    mjc506
    Expand Collapse

    Joined:
    Oct 13, 2013
    Messages:
    13
    Is it possible to apply a force instead of a displacement with a hydro?

    Or alternatively, is it possible to apply a torque to an arbitrary set of nodes (through lua)?
     
  2. metalmuncher

    metalmuncher
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    257
    You could have a really floppy hydro, which would tend to 'persuade' instead of brute force a displacement. ;)

    For applying torques, you might want to look at the lua for wheels or the engine, e.g. combustionEngine.lua:
    Code:
      obj:applyTorqueAxisCouple(inertialTorque, device.torqueReactionNodes[1], device.torqueReactionNodes[2], device.torqueReactionNodes[3]) 
    Depending on your requirements, thrusters might provide a useful starting place too:
    Code:
    obj:applyForce(thruster.id2, thruster.id1, t )
     
  3. mjc506

    mjc506
    Expand Collapse

    Joined:
    Oct 13, 2013
    Messages:
    13
    haha yes, that's what I'd been thinking of so far, but it needs additional control lua as the displacements involved are relatively large.

    Good shout, thanks

    I'd completely forgotten about thrusters! That may well work.

    Thanks for your help :)
     
  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