3rd person ESP?
I was wondering if 3rd person ESP was any different from FPS ESP?
Also, could anyone explain what exactly X,Y and Z in view matrix is?
I get that X is horizontal cam movement, Y is vertical, but wtf is Z then?
I managed to butcher an ESP Cpp tutorial project and translate it to VB, but Im having trouble understanding and finding the view matrix of a certain game.
Any help is greatly appreciated.
- - - Updated - - -
Might as well post what I have:
I hope I didnt fuck it up too much.
Also, could anyone explain what exactly X,Y and Z in view matrix is?
I get that X is horizontal cam movement, Y is vertical, but wtf is Z then?
I managed to butcher an ESP Cpp tutorial project and translate it to VB, but Im having trouble understanding and finding the view matrix of a certain game.
Any help is greatly appreciated.
- - - Updated - - -
Might as well post what I have:
I hope I didnt fuck it up too much.
Code:
Public Function WorldToScreen(ByVal WorldLocation As Vector3, ByVal mypos As Vector3) As Boolean
Dim vLocal As New Vector3
Dim vTransForm As New Vector3
vForward = New Vector3
vRight = New Vector3
vUpward = New Vector3
AngleVectors()
vLocal = SubVectorDist(WorldLocation, mypos)
vTransForm.X = vLocal.dotproduct(vRight)
vTransForm.Y = vLocal.dotproduct(vUpward)
vTransForm.Z = vLocal.dotproduct(vForward)
If vTransForm.Z < 0.01 Then
Return False
End If
ScreenX = screencenter(0) + (screencenter(0) / vTransForm.Z * (1 / fov(0))) * vTransForm.X
ScreenY = screencenter(1) - (screencenter(1) / vTransForm.Z * (1 / fov(1))) * vTransForm.Y
Return True
End Function
Code:
Public Sub AngleVectors()
Dim angle As Single
Dim sr As Single
Dim sp As Single
Dim sy As Single
Dim cr As Single
Dim cp As Single
Dim cy As Single
Dim cpi As Single = (3.141F * 2 / 360)
angle = viewAngles.y * cpi
'cpi = same view angles.x isn't
sy = CSng(Math.Sin(angle))
cy = CSng(Math.Cos(angle))
angle = viewAngles.x * cpi
sp = CSng(Math.Sin(angle))
cp = CSng(Math.Cos(angle))
angle = viewAngles.z * cpi
sr = CSng(Math.Sin(angle))
cr = CSng(Math.Cos(angle))
vForward.x = cp * cy
vForward.y = cp * sy
vForward.z = -sp
vRight.x = (-1 * sr * sp * cy + -1 * cr * -sy)
vRight.y = (-1 * sr * sp * sy + -1 * cr * cy)
vRight.z = -1 * sr * cp
vUpward.x = (cr * sp * cy + -sr * -sy)
vUpward.y = (cr * sp * sy + -sr * cy)
vUpward.z = cr * cp
End Sub
Code:
Public Sub TestESP()
Dim vec As New Vector3(-3376,1784,131) 'just a random spot near my player
Dim dist As Single = Get3dDistance(vec, PlayerDataContainer.position)
Dim drawx As Single = 400.0F / dist
Dim drawy As Single = 700.0F / dist
If WorldToScreen(vec, PlayerDataContainer.position) Then
drawForm.esp = True
drawForm.espx = CInt(Math.Truncate(ScreenX)) - (drawx / 2)
drawForm.espy = CInt(Math.Truncate(ScreenY - (drawy + (drawy / 2))))
drawForm.espw = drawx
drawForm.espH = drawy
End If
End Sub
