Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Stuck with how to make tiny.x stay in cam view

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 Anddos   Members   

588
Like
0Likes
Like

Posted 05 November 2012 - 05:11 AM

<p>I have a terrain and i  have tiny.x , what i would like todo is make tiny.x stay in view of the camera no matter if i rotate it with the mouse , this is the matrix so far

//these members are in the camera.h class
// Relative to world space.
D3DXVECTOR3 mPosW;
D3DXVECTOR3 mRightW;
D3DXVECTOR3 mUpW;
D3DXVECTOR3 mLookW;

fPos.x = gCamera->mPosW.x;
fPos.y = gCamera->mPosW.y - 0.05f;    
fPos.z = gCamera->mPosW.z + 0.1f;  

D3DXMatrixTranslation(&mWorldTrans,fPos.x,
                                 fPos.y,
            fPos.z);
HR(mFX->SetMatrix(mhWVP, &(mWorldScale*mWorldRotZ*mWorldTrans*gCamera->view()*gCamera->proj())));

Attached Thumbnails

  • tinywalk-terrain2.JPG

:)




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.