Added Comments

Added ability to hold shift and skip the terrain generation when loading
Added ability for the perlin terrain to save a raw image of the terrain to use as a cache
This commit is contained in:
iDunnoDev
2022-06-13 16:41:25 +01:00
committed by iDunnoDev
parent 51afdeecbd
commit 616f68bf8b
40 changed files with 468 additions and 51 deletions

View File

@ -184,8 +184,10 @@ void Camera::Update(void)
cameraTarget = cameraPosition + XMVector3Normalize(cameraForward);
}
else
{
{
// Trying some rotation so that the camera actually follows the model instead of staying in place
XMVECTOR offset = XMVectorSet(_followOffset.x, _followOffset.y, _followOffset.z, 1.0f);
// The pitch and roll rotations really mess it up and i dont have time to look into it, the simple turn follow is good enough for now
XMMATRIX offsetRotationMatrix = XMMatrixRotationAxis(defaultUp, _cameraYaw); // *XMMatrixRotationAxis(defaultForward, _cameraPitch);
cameraPosition = _nodeFollowed->GetNodePosition() + XMVector3TransformCoord(offset, offsetRotationMatrix);