Hi,
I was just going through the code of the Lyra Starter game (5.3) and I came across this section in the “LyraCameraMode_ThirdPerson.cpp” file. Specifically lines 282 - 287 in PreventCameraPenetration():
float const Weight = Cast<APawn>(Hit.GetActor()) ? Feeler.PawnWeight : Feeler.WorldWeight;
float NewBlockPct = Hit.Time;
NewBlockPct += (1.f - NewBlockPct) * (1.f - Weight);
// Recompute blocked pct taking into account pushout distance.
NewBlockPct = ((Hit.Location - SafeLoc).Size() - CollisionPushOutDistance) / (RayTarget - SafeLoc).Size();
Do I get this wrong or does the last line cancel the calculations done before that, effectively rendering the whole feeler-weight stuff useless? Should there be a *=
in the last line?
Cheers,
Simon