Howto:Animate gear scissors using the tracking animation: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Images)
m (typo)
Line 1: Line 1:
The new (in 2.11) '''locked-track animation''' can do exactly the same thing as the [http://wiki.blender.org/index.php/Doc:2.6/Manual/Constraints/Tracking/Locked_Track Locked Track constraint] available in Blender. However it can also be used to simulate simple inverse kinematic systems consisting of two bones conncted with a revolute joint (aka hinge).
The new (in 2.11) '''locked-track animation''' can do exactly the same thing as the [http://wiki.blender.org/index.php/Doc:2.6/Manual/Constraints/Tracking/Locked_Track Locked Track constraint] available in Blender. However it can also be used to simulate simple inverse kinematic systems consisting of two bones connected with a revolute joint (aka hinge).


<gallery widths=200>
<gallery widths=200>

Revision as of 15:52, 7 May 2013

The new (in 2.11) locked-track animation can do exactly the same thing as the Locked Track constraint available in Blender. However it can also be used to simulate simple inverse kinematic systems consisting of two bones connected with a revolute joint (aka hinge).

Slave center/object

The slave-center specifies the location of the revolute joint. Optionally an object can be specified using slave-name, which will be attached to the animated object and also tracks to the target object.

Examples

Basic usage (Same behaviour as Locked Track constraint in Blender):

<?xml version="1.0" encoding="utf8"?>
<PropertyList>
  <animation>
    <type>locked-track</type>

    <object-name>ADS Arm - Fuselage.r</object-name>
    <center>
      <x-m>4.9</x-m>
      <y-m>1.47</y-m>
      <z-m>3.82</z-m>
    </center>
    <lock-axis>
      <x>0</x>
      <y>1</y>
      <z>0</z>
    </lock-axis>
    <track-axis>
      <x>0.75</x>
      <y>0</y>
      <z>-0.662</z>
    </track-axis>

    <target-name>ADS Arm - Ramp.r</target-name>
    <target-center>
      <x-m>7.969</x-m>
      <y-m>1.475</y-m>
      <z-m>1.11</z-m>
    </target-center>

  </animation>
</PropertyList>

Gear scissor/Link with joint (In Blender the same animation can be achieved using an armature with two bones and an IK constraint applied to the second bone, tracking the target object. The animated object is attached to the first bone and the slave object to the second bone.):

<?xml version="1.0" encoding="utf8"?>
<PropertyList>
  <animation>
    <type>locked-track</type>

    <object-name>NLG Front Door</object-name>
    <center>
      <x-m>-11.52</x-m>
      <y-m>0</y-m>
      <z-m>1.13</z-m>
    </center>
    <lock-axis>
      <x>0</x>
      <y>1</y>
      <z>0</z>
    </lock-axis>
    <track-axis>
      <x>1</x>
      <y>0</y>
      <z>0</z>
    </track-axis>

    <target-name>NLG-Strut</target-name>
    <target-center>
      <x-m>-9.9</x-m>
      <y-m>0</y-m>
      <z-m>1.13</z-m>
    </target-center>

    <slave-name>NLG Front Door Arm</slave-name>
    <slave-center>
      <x-m>-11.335</x-m>
      <y-m>0</y-m>
      <z-m>1.076</z-m>
    </slave-center>
  </animation>
</PropertyList>

Use a condition to disable tracking (and optionally apply specify a rotation beeing applied while disabled):

<?xml version="1.0" encoding="utf8"?>
<PropertyList>
  <animation>
    <type>locked-track</type>

    <condition>
      <property>/controls/gear/nose-wheel-steering</property>
    </condition>
    <disabled-rotation-deg>-90</disabled-rotation-deg>

    <object-name>Torque Link Upper Arm</object-name>
    <center>
      <x-m>-9.785</x-m>
      <y-m>0</y-m>
      <z-m>1.04</z-m>
    </center>
    <lock-axis>
      <x>0</x>
      <y>1</y>
      <z>0</z>
    </lock-axis>
    <track-axis>
      <x>0.022</x>
      <y>0</y>
      <z>-1</z>
    </track-axis>

    <target-name>Torque Link Lower Arm</target-name>
    <target-center>
      <x-m>-9.789</x-m>
      <y-m>0</y-m>
      <z-m>0.454</z-m>
    </target-center>

    <slave-center>
      <x-m>-10.033</x-m>
      <y-m>0</y-m>
      <z-m>1.035</z-m>
    </slave-center>
  </animation>
</PropertyList>