Is there a way to assign an instantaneous joystick button, but not have the value jump directly from one value to another? Currently I have the following code in my joystick file but it results in the brakes snapping on and off. I wanted to get a smoother transition to be more realistic in ground handling (I know it won't make a big difference, but I want to try it) and also so that when I animate brake pedals they don't just snap back and forth. I tried propertySlew() but it seems that the value wasn't going to the numbers I supplied, but only slewing for a very short period of time taht wasn't even consistant. I played around with stepProp but I couldn't set the /sim/brakes properties from inside the joystick config file, so I gave up on that. I think I need some clarification on how these are supposed to work before I can figure out how to do this.

Thanks,
Josh

What I have now:

<button n="1">
<desc>Left Brake</desc>
<repeatable type="bool">false</repeatable>
<binding>
 <command>property-assign</command>
 <property>/controls/gear/brake-left</property>
 <value type="double">1.0</value>
</binding>
<mod-up>
 <binding>
  <command>property-assign</command>
  <property>/controls/gear/brake-left</property>
  <value type="double">0.0</value>
 </binding>
</mod-up>
</button>

What didn't work:

<button n="1">
<desc>Left Brake</desc>
<repeatable type="bool">false</repeatable>
<binding>
 <command>nasal</command>
 <script>controls.slewProp("/controls/gear/brake-left", 1)</script>
</binding>
<mod-up>
 <binding>
  <command>nasal</command>
  <script>controls.slewProp("/controls/gear/brake-left", -1)</script>
 </binding>
</mod-up>
</button>



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

Reply via email to