Browse Source

Merge pull request #513 from Hoikas/camera-crap

Fix weird camera angles caused by 9c49b57
Darryl Pogue 9 years ago
parent
commit
fec52f9a20
  1. 5
      Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp

5
Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp

@ -1565,14 +1565,13 @@ void plCameraBrain1_Fixed::Update(bool forced)
if (fCamera->GetTarget())
{
fTargetMatrix = fCamera->GetTarget()->GetCoordinateInterface()->GetLocalToWorld();
hsVector3 view;
hsVector3 up;
fTargetMatrix.GetAxis(0, &up, &view);
fTargetMatrix.GetAxis(nullptr, &up, nullptr);
fGoal = fTargetMatrix.GetTranslate();
if (fTargetPoint)
fPOAGoal = fTargetPoint->GetBrain()->GetGoal();
else
fPOAGoal = fGoal - (view * 10);
fPOAGoal = fGoal - (up * 10);
}
}
if (fFlags.IsBitSet(kRailComponent) && fRail)

Loading…
Cancel
Save