Skip to content

Commit

Permalink
Fix goto orbiting
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion committed Aug 9, 2024
1 parent 68b8660 commit a2ccaa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion colobot-base/src/object/task/taskgoto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,9 @@ bool CTaskGoto::EventProcess(const Event &event)
if ( cirSpeed > 1.0f ) cirSpeed = 1.0f;
if ( cirSpeed < -1.0f ) cirSpeed = -1.0f;

float linSpeed = 1.0f-(1.0f-0.3f)*fabs(cirSpeed);
m_physics->SetMotorSpeedZ(cirSpeed); // turns left / right
m_physics->SetMotorSpeedX(1.0f); // advance
m_physics->SetMotorSpeedX(linSpeed); // advance
return true;
}

Expand Down

0 comments on commit a2ccaa5

Please sign in to comment.