HotFriend Posted June 30, 2015 Share Posted June 30, 2015 Im making a Second Life Viewer for Windows Store. I have made a code for the camera // Initializes view parameters when the window size changes. void ViewerPage::CreateWindowSizeDependentResources() { Size outputSize = m_deviceResources->GetOutputSize(); float aspectRatio = outputSize.Width / outputSize.Height; float fovAngleY = 70.0f * XM_PI / 180.0f; // This is a simple example of change that can be made when the app is in // portrait or snapped view. if (aspectRatio < 1.0f) { fovAngleY *= 2.0f; } // Note that the OrientationTransform3D matrix is post-multiplied here Scale = XMMatrixScaling(0.25f, 0.25f, 0.25f); Translation = XMMatrixTranslation(0.0f, 0.0f, 0.0f); playerCharWorld = Scale * Translation; //Camera information LLCamera.position = XMVectorSet(0.0f, 10.0f, 8.0f, 0.0f); LLCamera.target = XMVectorSet(0.0f, 3.0f, 0.0f, 0.0f); LLCamera.up = XMVectorSet(0.0f, 1.0f, 0.0f, 0.0f); XMStoreFloat4x4(&m_constantBufferData.view, XMMatrixTranspose(XMMatrixLookAtRH(eye, at, up))); } Is there any way to set the cameras position? Link to comment Share on other sites More sharing options...
Ohjiro Watanabe Posted July 1, 2015 Share Posted July 1, 2015 You would be better off asking this kind of question in the opensource-dev user group. There is not much discussion of viewer development in the forum. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now