Josh Babcock said: > I think I found another bug in the animation code. Here is a snippet of the > xml. This code (with the comment) causes both of the right hand objects to move > when the right brake is applied. This does not happen to the left pedal arm > since I commented out the left pedal from the rudder animation. Somehow > grouping two objects in a rotate causes any subsequent rotates performed on one > of those objects to be performed on both. The rudder animations work fine > (except for my debugging comment). E-mail me if you want the whole aircraft, > it's a little under two megs. I am putting in a workaround, but saving the > files that show this behavior. > > Josh > > <!-- Pedals --> > > <animation> > <type>rotate</type> > <object-name>LeftPedal</object-name> > <property>controls/gear/brake-left</property> > <factor>-20</factor> > <center> > <x-m>1.28</x-m> > <y-m>0.0</y-m> > <z-m>-0.185</z-m> > </center> > <axis> > <x>0.0</x> > <y>1.0</y> > <z>0.0</z> > </axis> > </animation> > > <animation> > <type>rotate</type> > <object-name>RightPedal</object-name> > <property>controls/gear/brake-right</property> > <factor>-20</factor> > <center> > <x-m>1.28</x-m> > <y-m>0.0</y-m> > <z-m>-0.185</z-m> > </center> > <axis> > <x>0.0</x> > <y>1.0</y> > <z>0.0</z> > </axis> > </animation> > > <animation> > <type>rotate</type> > <!-- <object-name>LeftPedal</object-name> --> > <object-name>LeftPedalArm</object-name> > <property>controls/flight/rudder</property> > <factor>-10</factor> > <center> > <x-m>1.408</x-m> > <y-m>0.0</y-m> > <z-m>0.152</z-m> > </center> > <axis> > <x>0.0</x> > <y>1.0</y> > <z>0.0</z> > </axis> > </animation> > > <animation> > <type>rotate</type> > <object-name>RightPedal</object-name> > <object-name>RightPedalArm</object-name> > <property>controls/flight/rudder</property> > <factor>10</factor> > <center> > <x-m>1.408</x-m> > <y-m>0.0</y-m> > <z-m>0.152</z-m> > </center> > <axis> > <x>0.0</x> > <y>1.0</y> > <z>0.0</z> > </axis> > </animation> >
Keep in mind that a single callback is generated for each animation group. What this means is if you combine together two objects in an animation, then that group will end up inheriting whatever has already been defined as an animation callback for the first one in the list. I think that accurately describes the effect. Play around with defining the grouped animation before the individual object animation. Or maybe even changing the order of the objects in the group (so that something that doesn't already have a callback is listed first). This was probably designed this way to be more efficient. The alternative would be to apply a separate callback for each object in the group. There might be other issues...not sure. Best, Jim _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
