bloodthirstymime How do I cheat?
Reputation: 0
Joined: 11 Jul 2024 Posts: 1
|
Posted: Thu Jul 11, 2024 3:52 pm Post subject: Make camera go forward into the direction it's facing |
|
|
I have:
local baseAddress = 0x147309693A74
local xCoord = baseAddress - 0x0C
local yCoord = baseAddress - 0x0C - 0x0C
local zCoord = baseAddress
local orientationOffset = 0x30
And a function that's called when [W] is pressed
| Code: |
local function moveCameraForward()
local camX, camY, camZ, camOrientation = getCameraPositionAndOrientation()
local moveDistance = movementSpeed
local yawRad = math.rad(camOrientation)
local offsetX = moveDistance * math.sin(yawRad)
local offsetY = moveDistance * math.cos(yawRad)
writeDouble(xCoord, camX + offsetX)
writeDouble(yCoord, camY - offsetY)
end
|
Yet I move only on the XYZ axis instead of the direction i'm facing
|
|