changes
This commit is contained in:
@ -184,9 +184,11 @@ void Camera::Update(void)
|
||||
cameraTarget = cameraPosition + XMVector3Normalize(cameraForward);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
XMVECTOR offset = XMVectorSet(_followOffset.x, _followOffset.y, _followOffset.z, 1.0f);
|
||||
cameraPosition = _nodeFollowed->GetNodePosition() + offset;
|
||||
XMMATRIX offsetRotationMatrix = XMMatrixRotationAxis(defaultUp, _cameraYaw); // *XMMatrixRotationAxis(defaultForward, _cameraPitch);
|
||||
|
||||
cameraPosition = _nodeFollowed->GetNodePosition() + XMVector3TransformCoord(offset, offsetRotationMatrix);
|
||||
cameraTarget = XMLoadFloat4(&nodePosition) + XMVector3Normalize(cameraForward);
|
||||
}
|
||||
// Set the camera position
|
||||
|
Reference in New Issue
Block a user