OldSchoolHack

Register / Login English

World2Screen failed

icon Thread: World2Screen failed

Join Date: Jun 2012

Posts: 18

CPP Code:
  1. bool WorldToScreen( const Vector &vOrigin, Vector &vScreen ){
  2. if( ScreenTransforme(vOrigin , vScreen) == false ){
  3. int iScreenWidth, iScreenHeight;
  4. g_pEngine->GetScreenSize( iScreenWidth, iScreenHeight );
  5. float x = iScreenWidth / 2;
  6. float y = iScreenHeight / 2;
  7. x += 0.5 * vScreen.x * iScreenWidth + 0.5;
  8. y -= 0.5 * vScreen.y * iScreenHeight + 0.5;
  9. vScreen.x = x;
  10. vScreen.y = y;
  11. return true;
  12. }
  13. return false;
  14. }

ich bin mir nicht sicher ob dat noch funktioniert.
Die Renderview funktion bei CSS hatte sich beim letzen Update geändert