/// <inheritdoc /> protected override void OnStep() { if (Input.GetKeyDown(KeyCode.F)) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.BodyB.IsAwake = true; } if (Input.GetKeyDown(KeyCode.M)) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.BodyB.IsAwake = true; } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyboardKeyEventArgs key) { if (key.Key == Key.F) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.BodyB.IsAwake = true; } if (key.Key == Key.M) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.BodyB.IsAwake = true; } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyInputEventArgs keyInput) { if (keyInput.Key == KeyCodes.F) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.BodyB.IsAwake = true; } if (keyInput.Key == KeyCodes.M) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.BodyB.IsAwake = true; } }
protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.F) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.GetBodyB().SetAwake(true); } if (e.KeyCode == Keys.M) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.GetBodyB().SetAwake(true); } }
protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.L) { _joint.EnableLimit(!_joint.IsLimitEnabled()); } if (e.KeyCode == Keys.M) { _joint.EnableMotor(!_joint.IsMotorEnabled()); } if (e.KeyCode == Keys.P) { _joint.SetMotorSpeed(-_joint.GetMotorSpeed()); } }
/// <inheritdoc /> public override void OnKeyDown(KeyInputEventArgs keyInput) { if (keyInput.Key == KeyCodes.L) { Joint.EnableLimit(!Joint.IsLimitEnabled()); } if (keyInput.Key == KeyCodes.L) { Joint.EnableMotor(!Joint.IsMotorEnabled()); } if (keyInput.Key == KeyCodes.L) { Joint.SetMotorSpeed(-Joint.GetMotorSpeed()); } }
/// <inheritdoc /> public override void OnKeyDown(KeyboardKeyEventArgs key) { if (key.Key == Key.L) { _joint.EnableLimit(!_joint.IsLimitEnabled()); } if (key.Key == Key.L) { _joint.EnableMotor(!_joint.IsMotorEnabled()); } if (key.Key == Key.L) { _joint.SetMotorSpeed(-_joint.GetMotorSpeed()); } }
/// <inheritdoc /> public override void OnRender() { DrawString("Keys: (l) limits, (m) motors, (s) speed"); var force = _joint.GetMotorForce(1 / TestSettings.Dt); DrawString($"Motor Force = {force}"); if (Input.GetKeyDown(KeyCode.L)) { _joint.EnableLimit(!_joint.IsLimitEnabled()); } if (Input.GetKeyDown(KeyCode.L)) { _joint.EnableMotor(!_joint.IsMotorEnabled()); } if (Input.GetKeyDown(KeyCode.L)) { _joint.SetMotorSpeed(-_joint.GetMotorSpeed()); } }
/// <inheritdoc /> protected override void PreStep() { DrawString("Keys: (l) limits, (m) motors, (s) speed"); var force = _joint.GetMotorForce(TestSettings.Frequency); DrawString($"Motor Force = {force}"); if (Input.GetKeyDown(KeyCode.L)) { _joint.EnableLimit(!_joint.IsLimitEnabled()); } if (Input.GetKeyDown(KeyCode.L)) { _joint.EnableMotor(!_joint.IsMotorEnabled()); } if (Input.GetKeyDown(KeyCode.L)) { _joint.SetMotorSpeed(-_joint.GetMotorSpeed()); } }