[hlcoders] GetTargetInScreen space returning wrong/scaled position

2008-11-22 Thread Jed
Ok this is really confusing me. I've got full screen panel which I want to draw elements on based on the position of elements in my map. I'm setting my panel full screen with: int nHudWidth, nHudHeight; GetHudSize( nHudWidth, nHudHeight ); SetSize( nHudWidth, nHudHeight ); I've check them

Re: [hlcoders] GetTargetInScreen space returning wrong/scaled position

2008-11-22 Thread Garry Newman
Assuming that GetTargetInScreenSpace uses the view/proj matrices to work out the pixels.. if you're rendering this in a panel then wouldn't they have changed, making it all useless? Try capturing the positions during the actual rendering process, then using those to draw to the HUD later on.

Re: [hlcoders] GetTargetInScreen space returning wrong/scaled position

2008-11-22 Thread Jorge Rodriguez
There is also ScreenTransform(). I don't know if it will work for you but it is worth noting. -- Jorge Vino Rodriguez ___ To unsubscribe, edit your list preferences, or view the list archives, please visit:

Re: [hlcoders] GetTargetInScreen space returning wrong/scaled position

2008-11-22 Thread Jed
Solved it. GetVectorInScreenSpace() calls ScreenTransform(); Problem was that GetTargetInScreenSpace() simply passes an entities WordSpaceCenter to GetVectorInScreenSpace() which is no good for the type of entity I was using. In the end I just used GetVectorInScreenSpace() directly passing my