From 1a15ad216d57d127d2b287c48bbb44e4f6e6596f Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov Date: Sun, 20 Feb 2022 05:53:57 +0300 Subject: [PATCH] =?UTF-8?q?Increase=20the=20base=20angular=20velocity=20to?= =?UTF-8?q?=20900=C2=B0/sec=20(#5192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + apps/openmw/mwmechanics/steering.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ebd3b07e3..a51c785f48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Bug #5088: Sky abruptly changes direction during certain weather transitions Bug #5100: Persuasion doesn't always clamp the resulting disposition Bug #5120: Scripted object spawning updates physics system + Bug #5192: Actor turn rate is too slow Bug #5207: Loose summons can be present in scene Bug #5377: console does not appear after using menutest in inventory Bug #5379: Wandering NPCs falling through cantons diff --git a/apps/openmw/mwmechanics/steering.hpp b/apps/openmw/mwmechanics/steering.hpp index f305a6961c..99fa1387db 100644 --- a/apps/openmw/mwmechanics/steering.hpp +++ b/apps/openmw/mwmechanics/steering.hpp @@ -16,9 +16,11 @@ namespace MWMechanics // Max rotating speed, radian/sec inline float getAngularVelocity(const float actorSpeed) { - const float baseAngluarVelocity = 10; + constexpr float degreesPerFrame = 15.f; + constexpr int framesPerSecond = 60; + const float baseAngularVelocity = osg::DegreesToRadians(degreesPerFrame * framesPerSecond); const float baseSpeed = 200; - return baseAngluarVelocity * std::max(actorSpeed / baseSpeed, 1.0f); + return baseAngularVelocity * std::max(actorSpeed / baseSpeed, 1.0f); } /// configure rotation settings for an actor to reach this target angle (eventually)