• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 16
    1. #1
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74

      CSS World2Screen

      John Kittz
      Since many People are asking them how to do external WorldToScreen in CSS, here i go:

      [PHP]
      typedef float ViewMatrix[ 16 ]; //Can be done different, i'm just using it like this

      bool WorldToScreen( Vector from, Vector &to, ViewMatrix m_vMatrix )
      {
      to.x = m_vMatrix[ 0 ] * from.x + m_vMatrix[ 1 ] * from.y + m_vMatrix[ 2 ] * from.z + m_vMatrix[ 3 ];
      to.y = m_vMatrix[ 4 ] * from.x + m_vMatrix[ 5 ] * from.y+ m_vMatrix[ 6 ] * from.z + m_vMatrix[ 7 ];
      float w = m_vMatrix[ 12 ] * from.x + m_vMatrix[ 13 ] * from.y + m_vMatrix[ 14 ] * from.z + m_vMatrix[ 15 ];

      if( w < 0.01f ) return false;

      float invw = 1.0f / w;
      to.x *= invw;
      to.y *= invw;

      float x = Resolution[ 0 ] / 2; // Resolution is my Global Variable which is holding the resolution of the game
      float y = Resolution[ 1 ] / 2;

      x += 0.5 * to.x * Resolution[ 0 ] + 0.5;
      y -= 0.5 * to.y * Resolution[ 1 ] + 0.5;

      to.x = x;
      to.y = y;

      return true;
      }
      [/PHP]

      But how to get to the WorldToScreenMatrix( m_vMatrix in my example above ) and use it?

      [PHP]
      //Before every WorldToScreen Call:
      DWORD dwTemp;
      ViewMatrix W2SMatrix;
      ReadProcessMemory( hlProc, LPCVOID( dwClientDLL + 0x54BE14 ), &dwTemp, 4, 0 );
      ReadProcessMemory( hlProc, LPCVOID( dwTemp + 0x22C ), &W2SMatrix, sizeof( ViewMatrix ), 0 );
      //Then:
      if( WorldToScreen( TargetPlayer->GetAbsOrigin( ), ScreenCoordinates, W2SMatrix ) )
      {
      //Draw Shit
      }
      [/PHP]
      Offsets are up2date, i may post them after updates here, but finding out, how to update them yourself should be better

    2. Thanks c5, Syperus, Crypt, m00k00 thanked for this post
    3. #2
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      Yeah, just different Offsets.

    4. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      m00k00's Avatar
      Join Date
      Nov 2012
      Posts
      1
      Thanks (-->)
      1
      Thanks (<--)
      0
      Hi siM,
      thanks for your code.
      Do you have a tutorial or some hints how to find the WorldToScreenMatrix (i.e. in other games)?
      This would be great.
      Greetings

    5. #4
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      AlexSleyore's Avatar
      Join Date
      Oct 2012
      Location
      http://fadedengine.wordpress.com/
      Posts
      101
      Thanks (-->)
      3
      Thanks (<--)
      10
      World to screen is a math concept, its the same for all games.

    6. #5
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      NubTIK's Avatar
      Join Date
      Dec 2012
      Posts
      61
      Thanks (-->)
      1
      Thanks (<--)
      40
      Please, Correct me if im wrong but dont you just have the w2smatrix(3'rd param in the function) as your own position?
      ≧◔◡◔≦

    7. #6
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      My own Position? Why should I use my own Position for the World2Screen?
      Btw in this Code is a little Mistake with the Dll i'm reading the matrix out, it's not the client.dll, but the engine.dll.

    8. #7
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      NubTIK's Avatar
      Join Date
      Dec 2012
      Posts
      61
      Thanks (-->)
      1
      Thanks (<--)
      40
      Quote Originally Posted by siM View Post
      My own Position? Why should I use my own Position for the World2Screen?
      Btw in this Code is a little Mistake with the Dll i'm reading the matrix out, it's not the client.dll, but the engine.dll.
      Lol ye sorry I know I was pretty confused at the time, I know you dont need position for w2s its just that when Isaw 0x22C I knew that was the current position offset in the clocalplayer lol sorry for the inconvenience
      ≧◔◡◔≦

    9. #8
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      The new Offsets:
      Pointer: engine.dl + 0x58371C
      Offset: Pointer + 0x2D4

      Hf.

    10. Thanks ndani14 thanked for this post
    11. #9
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      roarboar's Avatar
      Join Date
      Feb 2013
      Posts
      27
      Thanks (-->)
      1
      Thanks (<--)
      0
      I have some questions regarding implementation.
      First of all, what is contained in the "To" and "From" parameters? I always thought To is the enemy's x,y,z coords and from is the players x,y,z coords.

      Secondly, I have some programming questions, since I program in c# some of the code seems a bit peculiar to me.

      From what I understand you make a float array with the length of 16.
      Then you pass 16 as the buffer length to the readprocessmemory method. But usually readprocessmemory returns bytes and not floats. So do you actually get 16 real floats here or just bytes? And convert them to floats?
      Needless to say if I want to retrieve 16 floats in c# i need to do 16 x 4 because each float consists of 4 bytes. Thats why this is so confusing to me.

      also some values like the third index seem a bit arbitrary, when you retrieve these results do they look something like this? https://i.imgur.com/vyZNmXv.jpg

      Looking forward to your replies I cant wait to finally get my esp done !

    12. #10
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      Cheats'n'Trainers
      Vector from = enemys x,y,z
      To = x,y Coordinates on Screen

      ReadProcessMemory is taking the return value as a parameter, so depending on that, it will return the value. Because i use a Matrix of 16 Floats i have to change the size as well.

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Discuss] World2Screen function
      By [GH]Rake in forum ESP - WorldToScreen - ViewMatrix
      Replies: 11
      Last Post: 03-17-2017, 07:17 PM
    2. [Help] World2Screen issues
      By Kroopy in forum Assault Cube Hacks
      Replies: 3
      Last Post: 02-03-2016, 09:49 PM
    3. [Help] CSGO World2Screen (C#)
      By Luciz in forum Hacking Help
      Replies: 3
      Last Post: 07-16-2014, 07:41 AM
    4. [Help] Help with World2Screen
      By j3b in forum GH Tutorials Help
      Replies: 8
      Last Post: 02-08-2013, 07:08 PM