/// <inheritdoc /> protected override void OnRender() { var torque = _joint.GetMotorTorque(TestSettings.Hertz); DrawString($"Motor Torque = {torque}"); ImGui.SetNextWindowPos(new Vector2(10.0f, 100.0f)); ImGui.SetNextWindowSize(new Vector2(200.0f, 100.0f)); ImGui.Begin("Joint Controls", ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize); if (ImGui.Checkbox("Limit", ref _enableLimit)) { _joint.EnableLimit(_enableLimit); } if (ImGui.Checkbox("Motor", ref _enableMotor)) { _joint.EnableMotor(_enableMotor); } if (ImGui.SliderFloat("Speed", ref _motorSpeed, -100.0f, 100.0f, "%.0f")) { _joint.SetMotorSpeed(_motorSpeed); } ImGui.End(); }
/// <inheritdoc /> protected override void OnRender() { var torque = Joint.GetMotorTorque(TestSettings.Hertz); DrawString($"Motor Torque = {torque}"); var F = Joint.GetReactionForce(TestSettings.Hertz); DrawString($"Reaction Force = ({F.X}, {F.X})"); }
public override void Update(GameSettings settings, GameTime gameTime) { base.Update(settings, gameTime); float torque = _joint.GetMotorTorque(settings.Hz); DrawString($"Motor Torque = {torque}"); Vector2 F = _joint.GetReactionForce(settings.Hz); DrawString($"Reaction Force = ({F.X}, {F.Y})"); }
/// <inheritdoc /> protected override void OnRender() { var torque = Joint.GetMotorTorque(TestSettings.Hertz); DrawString($"Motor Torque = {torque}"); }