Page 1 of 1
Camera problem
Posted: Wed Oct 12, 2011 5:19 am
by Kadzumba
Hi, i have simple question. What i need to change in camera.lua (class catalog) to stop rotating/moving camera?
I had that in my old file but made the mistake and replaced it with original file... (one of the users of this forum did the file but I can find that post...)
PS. Why do I need? less CPU usage.
(sorry for bad english)
Re: Camera problem
Posted: Wed Oct 12, 2011 6:18 am
by rock5
So you want the camera angle not to change?
The easiest way would be to disable the setRotation function in camera.lua. Just comment out the contents of the function 'CCamera:setRotation(angle)'
Code: Select all
function CCamera:setRotation(angle)
--[[local proc = getProc();
local px = player.X
local pz = player.Z
local cx = memoryReadFloat(proc, self.Address + addresses.camX_offset)
local cz = memoryReadFloat(proc, self.Address + addresses.camZ_offset)
local currentDistance = distance(px,pz,cx,cz)
local nx = px + math.cos(angle + math.pi) * currentDistance;
local nz = pz + math.sin(angle + math.pi) * currentDistance;
memoryWriteFloat(proc, self.Address + addresses.camX_offset, nx);
memoryWriteFloat(proc, self.Address + addresses.camZ_offset, nz);]]
end
Re: Camera problem
Posted: Wed Oct 12, 2011 9:34 am
by Kadzumba
Works fine, thx a lot.
