How to limit a torque?

Jan 22, 2010 at 6:44 PM
Edited Jan 22, 2010 at 6:47 PM

Hi everybody!

I use in my game custom UserControl:

 

Canvas x:Name="WheelLayoutRoot"> 

<Canvas x:Name="WheelOne" Height="32" Width="32" Canvas.Top="41" Canvas.Left="3"> 

<i:Interaction.Behaviors>  

<pb:PhysicsObjectBehavior RestitutionCoefficient="-1"/> 

</i:Interaction.Behaviors>  

<i:Interaction.Triggers> 

<pb:PhysicsKeyTrigger Key="Space">  

<pb:PhysicsApplyTorqueBehavior x:Name="WheelOneApplyTorqueBehavior_" TorqueValue="650"/> 

</pb:PhysicsKeyTrigger>  

</i:Interaction.Triggers> 

<Ellipse x:Name="WheelOne1" StrokeThickness="0" Height="32" Width="32">

...

</Ellipse >

</Canvas

</Canvas>

 

While I pressing Space torque increases. How to limit a torque value?

Thanks in advance.