Re: [Flightgear-devel] animation bug

2004-05-20 Thread Jim Wilson
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
typerotate/type
object-nameLeftPedal/object-name
propertycontrols/gear/brake-left/property
factor-20/factor
center
 x-m1.28/x-m
 y-m0.0/y-m
 z-m-0.185/z-m
/center
axis
 x0.0/x
 y1.0/y
 z0.0/z
/axis
   /animation
 
   animation
typerotate/type
object-nameRightPedal/object-name
propertycontrols/gear/brake-right/property
factor-20/factor
center
 x-m1.28/x-m
 y-m0.0/y-m
 z-m-0.185/z-m
/center
axis
 x0.0/x
 y1.0/y
 z0.0/z
/axis
   /animation
 
   animation
typerotate/type
!-- object-nameLeftPedal/object-name --
object-nameLeftPedalArm/object-name
propertycontrols/flight/rudder/property
factor-10/factor
center
 x-m1.408/x-m
 y-m0.0/y-m
 z-m0.152/z-m
/center
axis
 x0.0/x
 y1.0/y
 z0.0/z
/axis
   /animation
 
   animation
typerotate/type
object-nameRightPedal/object-name
object-nameRightPedalArm/object-name
propertycontrols/flight/rudder/property
factor10/factor
center
 x-m1.408/x-m
 y-m0.0/y-m
 z-m0.152/z-m
/center
axis
 x0.0/x
 y1.0/y
 z0.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


Re: [Flightgear-devel] animation bug

2004-05-20 Thread Josh Babcock
Jim Wilson wrote:
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
  typerotate/type
  object-nameLeftPedal/object-name
  propertycontrols/gear/brake-left/property
  factor-20/factor
  center
   x-m1.28/x-m
   y-m0.0/y-m
   z-m-0.185/z-m
  /center
  axis
   x0.0/x
   y1.0/y
   z0.0/z
  /axis
 /animation
 animation
  typerotate/type
  object-nameRightPedal/object-name
  propertycontrols/gear/brake-right/property
  factor-20/factor
  center
   x-m1.28/x-m
   y-m0.0/y-m
   z-m-0.185/z-m
  /center
  axis
   x0.0/x
   y1.0/y
   z0.0/z
  /axis
 /animation
 animation
  typerotate/type
  !-- object-nameLeftPedal/object-name --
  object-nameLeftPedalArm/object-name
  propertycontrols/flight/rudder/property
  factor-10/factor
  center
   x-m1.408/x-m
   y-m0.0/y-m
   z-m0.152/z-m
  /center
  axis
   x0.0/x
   y1.0/y
   z0.0/z
  /axis
 /animation
 animation
  typerotate/type
  object-nameRightPedal/object-name
  object-nameRightPedalArm/object-name
  propertycontrols/flight/rudder/property
  factor10/factor
  center
   x-m1.408/x-m
   y-m0.0/y-m
   z-m0.152/z-m
  /center
  axis
   x0.0/x
   y1.0/y
   z0.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
Oops, my bad.  I already dealt with this in the yoke, but forgot.  The order 
that the definitions has to go in are counter-intuitive for me, and I didn't 
think to  put the parent before the child.  I guess I still don't really 
understand how the callbacks work, but this problem is fixed.  The order of the 
objects within the animation doesn't seem to matter here, I tried it both ways 
just now.

Josh
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] animation bug

2004-05-20 Thread Jim Wilson
Vivian Meazza said:

 
 
 Josh Babcock wrote:
 
  
  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
 typerotate/type
 object-nameLeftPedal/object-name
 propertycontrols/gear/brake-left/property
 factor-20/factor
 center
  x-m1.28/x-m
  y-m0.0/y-m
  z-m-0.185/z-m
 /center
 axis
  x0.0/x
  y1.0/y
  z0.0/z
 /axis
/animation
  
animation
 typerotate/type
 object-nameRightPedal/object-name
 propertycontrols/gear/brake-right/property
 factor-20/factor
 center
  x-m1.28/x-m
  y-m0.0/y-m
  z-m-0.185/z-m
 /center
 axis
  x0.0/x
  y1.0/y
  z0.0/z
 /axis
/animation
  
animation
 typerotate/type
 !-- object-nameLeftPedal/object-name --
 object-nameLeftPedalArm/object-name
 propertycontrols/flight/rudder/property
 factor-10/factor
 center
  x-m1.408/x-m
  y-m0.0/y-m
  z-m0.152/z-m
 /center
 axis
  x0.0/x
  y1.0/y
  z0.0/z
 /axis
/animation
  
animation
 typerotate/type
 object-nameRightPedal/object-name
 object-nameRightPedalArm/object-name
 propertycontrols/flight/rudder/property
 factor10/factor
 center
  x-m1.408/x-m
  y-m0.0/y-m
  z-m0.152/z-m
 /center
 axis
  x0.0/x
  y1.0/y
  z0.0/z
 /axis
/animation
  
  
 
 If you link 2 objects in any animation they are linked in all animations.
 Just separate the 2 objects into different animations. A feature not a bug
 :-)
 

That's not exactly true.  See my earlier post and other past discussion of
this on the list.

Best,

Jim


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel