From 7f124eef588dd4b4a0a224508709aa07e0c0eb11 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 6 Oct 2022 19:55:55 +1100 Subject: [PATCH] - Adjust chase-cam code to work in a pitch-corrected capacity. --- source/core/gamefuncs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/gamefuncs.cpp b/source/core/gamefuncs.cpp index 216fbd610..541249656 100644 --- a/source/core/gamefuncs.cpp +++ b/source/core/gamefuncs.cpp @@ -44,7 +44,7 @@ bool calcChaseCamPos(DVector3& ppos, DCoreActor* act, sectortype** psect, DAngle if (!*psect) return false; // Calculate new pos to shoot backwards - DVector3 npos = -DVector3(ang.ToVector(), horiz.Tan()) * backamp; + DVector3 npos = -DVector3(ang.ToVector() * horiz.Cos(), horiz.Sin()) * backamp; HitInfoBase hitinfo; auto bakcstat = act->spr.cstat;