Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
//whitespace removed
// <<OVERRIDES>>
public override void SetDeltaAngle( double dAngle =0 ){
double Vel;
if( !Override && Motor != null ) {
Vel = dAngle/Math.PI*30/dt;
double SoftMax = (Motor.UpperLimitRad < 360 ?
Math.Min( 1, Math.Abs( Motor.UpperLimitRad-Motor.Angle )/SoftMaxLimit ) : 1 );
double SoftMin = (Motor.LowerLimitRad > -360 ?
Math.Min( 1, Math.Abs( Motor.LowerLimitRad-Motor.Angle )/SoftMinLimit ) : 1 );
Vel = Math.Min( MaxSpeed*SoftMax, Vel );
Vel = Math.Max( -MaxSpeed*SoftMin, Vel );
if ( Math.Abs(Vel) < MaxSpeed+5) {
Motor.TargetVelocityRad = (Single)(Vel*Math.PI/30);
}
}
}
public override double GetAngle(){
if ( Motor != null ){
return -Motor.Angle+Offset;
} else {
return 0;
}
}
public override double GetDeltaAngle( ){
if ( Motor != null
&& Motor.Enabled && Motor.Angle < Motor.UpperLimitRad
&& Motor.Angle > Motor.LowerLimitRad) {
return -Motor.TargetVelocityRad*dt;
} else {
return 0;
}
}