I have a new issue. I have progress in that I have the landing gear moving, but they are moving up through the wings and over the fuselage, like they are hinging from inside the center of the fuselage.
Can someone figure out what I have done wrong? It took me a while to get to this point. I have been trying out many versions of top landing gear, trying to get one to animate. The Pivot points are proper, but it appears to hinge from the center of the plane.
This is the RigidBody section at the top of the TMD file;
// right landing gear //////////////////////////////////////////////////////////////////////////////////////////////// / / / / / /
// right main gear
<[string8][object][rigidbody]
<[string8][Name][GearMainRight]>
<[float64][Mass][10.0]>
<[tmvector3d][InertiaLength][1.044 0.2628 0.3312]>
<[tmvector3d][R0][0.1539 -1.0833 -0.1453]>
<[tmmatrix3d][B0][1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0]>
>
<[string8][object][jointmulti]
<[string8][Name][JointRightWingRightGear]>
<[string8][Body0][WingSmoothLeft003]>
<[string8][Body1][GearMainRight]>
<[tmvector3d][Axis] [ 0.0 0.0 1.0 ]>
<[tmvector3d][Position][ 0.1539 -1.0833 -0.1453 ]>
<[float64][Kp][100000.0]>
<[float64][Kd][2500.0]>
<[float64][ZeroPosition][0.0]>
<[float64][InitialVelocity][0.0]>
<[uint32][Type][1]>
>
<[string8][object][hydraulic_cylinder]
<[string8][Name][RightGearCyclinder]>
<[string8][Body0][Fuselage]>
<[string8][Body1][GearMainRight]>
<[tmvector3d][R0][ -0.4522 -0.0001 0.0567 ]>
<[tmvector3d][R1][ 0.1539 -1.0833 -0.1453 ]>
<[float64][Stroke][-0.43326489667]>
<[float64][K][22500000.0]>
<[float64][D][12500.0]>
<[string8][Control][MapLeftGear.Output]>
>
Display More
This is the Graphics Section of the TMD;
<[string8][object][hingedbodygraphics]
<[string8][Name][GearLeftMainStrut00]>
<[uint32][PositionID][GearMainLeft.R]>
<[uint32][OrientationID][GearMainLeft.Q]>
<[string8][GeometryList][ GearMainLeft ]>
<[string8][InputAngle][ServoGearDoor3.Output]>
<[tmvector3d][Axis][0.0748 -0.9943 0.0761]>
<[tmvector3d][Pivot][0.1542 1.0891 -0.1453]>
<[float64][AngleMax][-0.7]>
>
<[string8][object][hingedbodygraphics]
<[string8][Name][GearRightMainStrut00]>
<[uint32][PositionID][GearMainRight.R]>
<[uint32][OrientationID][GearMainRight.Q]>
<[string8][GeometryList][ GearMainRight ]>
<[string8][InputAngle][ServoGearDoor3.Output]>
<[tmvector3d][Axis][0.0830 0.9936 0.0765]>
<[tmvector3d][Pivot][0.1539 -1.0833 -0.1453]>
<[float64][AngleMax][-0.7]>
>
Display More
These should be the controllers?
<[string8][object][graphics_input]
<[string8][Name][FlapsMapping]>
<[uint32][InputID][FlapsMapping.Output]>
<[float64][Scaling][1.0]>
>
<[string8][object][graphics_mix]
<[string8][Name][FlapHandleButtonPressed]>
<[uint32][Input0][ServoFlaps.Output]>
<[uint32][Input1][FlapsMapping.Output]>
<[uint32][Weight0][1.0]>
<[uint32][Weight1][-1.0]>
<[uint32][Offset][0.0]>
>
<[string8][object][graphics_mapping]
<[string8][Name][FlapHandleButtonPressedMapping]>
<[string8][Input][FlapHandleButtonPressed.Output]>
<[tmvector2d][Map][ (-0.05 0.005) (0.0 0.0) (0.05 0.005) ]>
>
<[string8][object][graphics_translation]
<[string8][Name][FlapHandleButtonTranslation]>
<[string8][Input][FlapHandleButtonPressedMapping.Output]>
<[tmvector3d][Axis][ -1.0 0.0 0.0 ]>
>
<[string8][object][graphics_rotation]
<[string8][Name][FlapHandleButtonRotation]>
<[string8][InputAngle][FlapHandle.Output]>
<[tmvector3d][Axis][ 0.0 1.0 0.0 ]>
<[tmvector3d][Pivot][-0.103270 0.0 0.118080]>
<[string8][InputTransform][FlapHandleButtonTranslation.Output]>
>
Display More
This is the control section just before Graphics;
// gear start ////////////////////////////////////////////////// / / / /
// gear doors and gear lid animation ////////////////////////////// / / / /
<[string8][object][linear_interpolation]
<[string8][Name][MapLeftGearDoor]>
<[string8][Input][ServoLeftGearSequence.Output]>
<[tmvector2d][Map][ (0.0 0.0) (0.05 1.0) (1.0 1.0) ]>
>
<[string8][object][linear_interpolation]
<[string8][Name][MapRightGearDoor]>
<[string8][Input][ServoRightGearSequence.Output]>
<[tmvector2d][Map][ (0.0 0.0) (0.05 1.0) (1.0 1.0) ]>
>
<[string8][object][output]
<[string8][Name][ServoLeftGearDoor]>
<[string8][Input][MapLeftGearDoor.Output]>
>
<[string8][object][output]
<[string8][Name][ServoRightGearDoor]>
<[string8][Input][MapRightGearDoor.Output]>
>
// gear sound
<[string8][object][linear_interpolation]
<[string8][Name][MapGearPositionSound]>
<[string8][Input][ServoLeftGearSequence.Output]>
<[tmvector2d][Map][ (0.0 1.0) (1.0 0.0) ]>
>
<[string8][object][output]
<[string8][Name][GearPositionSound]>
<[string8][Input][MapGearPositionSound.Output]>
>
// gear lever
<[string8][object][control_input_binary]
<[string8][Name][GearInput]>
<[string8][Input][Controls.Gear]>
<[float64][Value][1.0]>
>
<[string8][object][servolinear]
<[string8][Name][ServoGearSwitch]>
<[string8][Input][GearInput.Output]>
<[float64][OutputSpeed][5.0]>
<[float64][Position][1.0]>
<[float64array][InputPosition][ 0.0 1.0 ]>
<[float64array][OutputPosition][ 0.0 1.0 ]>
>
<[string8][object][output]
<[string8][Input][ServoGearSwitch.Output]>
>
// gear sequence
<[string8][object][ground_sensor]
<[string8][Name][OnGroundSensor]>
<[string8][InputLeftLoad] [LeftWheelHull.Load]>
<[string8][InputRightLoad][RightWheelHull.Load]>
<[float64][Threshold][1000.0]>
>
<[string8][object][logic_or]
<[string8][Name][GearDownOrOnGround]>
<[string8][Input0][GearInput.Output]>
<[string8][Input1][OnGroundSensor.Output]>
>
<[string8][object][servolinear]
<[string8][Name][ServoFrontGearSequence]>
<[string8][Input][GearDownOrOnGround.Output]>
<[float64][OutputSpeed][0.3]>
<[float64][Position][1]>
<[float64array][InputPosition][ 0.0 1.0 ]>
<[float64array][OutputPosition][ 0.0 1.0 ]>
>
<[string8][object][output]
<[string8][Input][ServoFrontGearSequence.Output]>
>
<[string8][object][servolinear]
<[string8][Name][ServoLeftGearSequence]>
<[string8][Input][GearDownOrOnGround.Output]>
<[float64][OutputSpeed][0.2]>
<[float64][Position][1]>
<[float64array][InputPosition][ 0.0 1.0 ]>
<[float64array][OutputPosition][ 0.0 1.0 ]>
>
<[string8][object][output]
<[string8][Input][ServoLeftGearSequence.Output]>
>
<[string8][object][servolinear]
<[string8][Name][ServoRightGearSequence]>
<[string8][Input][GearDownOrOnGround.Output]>
<[float64][OutputSpeed][0.21]>
<[float64][Position][1]>
<[float64array][InputPosition][ 0.0 1.0 ]>
<[float64array][OutputPosition][ 0.0 1.0 ]>
>
<[string8][object][output]
<[string8][Input][ServoRightGearSequence.Output]>
>
<[string8][object][linear_interpolation]
<[string8][Name][ServoFrontGear]>
<[string8][Input][ServoFrontGearSequence.Output]>
<[tmvector2d][Map][ (0.0 1.0) (0.15 1.0) (0.85 0.0) (1.0 0.0) ]>
>
<[string8][object][linear_interpolation]
<[string8][Name][MapLeftGear]>
<[string8][Input][ServoLeftGearSequence.Output]>
<[tmvector2d][Map][ (0.0 1.0) (0.15 1.0) (0.85 0.0) (1.0 0.0) ]>
>
<[string8][object][linear_interpolation]
<[string8][Name][MapRightGear]>
<[string8][Input][ServoRightGearSequence.Output]>
<[tmvector2d][Map][ (0.0 1.0) (0.15 1.0) (0.85 0.0) (1.0 0.0) ]>
>
<[string8][object][output]
<[string8][Name][ServoLeftGear]>
<[string8][Input][MapLeftGear.Output]>
>
<[string8][object][output]
<[string8][Name][ServoRightGear]>
<[string8][Input][MapRightGear.Output]>
>
<[string8][object][sender]
<[string8][Name][SenderGearPosition]>
<[string8][Input][ServoLeftGearSequence.Output]>
<[string8][Message][Aircraft.Gear]>
>
Display More
I have been copy/pasting and experimenting, then redoing it, over and over, trying to find a section that works. When I try adding a pivot and axis point to a rigid body, it crashes the sim. Makes sense, but when I do a hinged body, it doesnt work.
I also tried 'MapRightGear' (same for left) and it hinges in the same spot.