Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


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


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   -  Reputation: 508

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

:)

Sponsor:



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.



PARTNERS