Page 1 of 1

Strange Behavior ?

Posted: Tue Jul 28, 2009 6:41 pm
by botlover
Okay, i know this has been broad up before, but i do not recall where and when, so sorry for me posting about this.


I have this strange behavior of the bot. it changes my viewing angle and distance.
if i place the cam to be nearly 90 degrees it will change it to be more like 45* wich ofc is really anoying.

AND as if that wasent enough, it also changes the distance i've set zooming in and out randomly as it moves around.

i dont know if you are able to imagin this, but it compromises the harvesting function tremendously since it makes it run on if it's zooming and this why passing on a good amount of nodes wich again makes the bot loog more like a bot and less like a "real" player...


hope someone know a fix for this.

thanks in advance :)

Re: Strange Behavior ?

Posted: Tue Jul 28, 2009 7:21 pm
by d003232
I know that behaivor and hope there will be a solution in the next time. But at the same time I get used of that.

I don't have the feeling, that I have miss nodes because of that. Perhaps you can play a little arount with your zoom? If you zoom max away, it will not zoom in and out. But doing that, the nodes are a little small. So I usally use a medium distance and have the zoom in and out. But because the node is allways in the middle of the screen, I normaly don't miss anything because of that.

Re: Strange Behavior ?

Posted: Tue Jul 28, 2009 8:41 pm
by Administrator
It is a known problem. I just need a static pointer chain to the zoom amount (between 1 and 125, float). After that, it's just modifying this function:

Code: Select all

function CCamera:setRotation(angle)
	local proc = getProc();
	local maxViewDistance = 125; -- Hard value set by the game
	local px = player.X;
	local pz = player.Z;
	local nx = px + math.cos(angle + math.pi) * maxViewDistance;
	local nz = pz + math.sin(angle + math.pi) * maxViewDistance;

	memoryWriteFloat(proc, self.Address + camX_offset, nx);
	memoryWriteFloat(proc, self.Address + camZ_offset, nz);
end
Remember high school trigonometry class when you would say "I'll never use this"? Yeah, me neither.

Re: Strange Behavior ?

Posted: Wed Jul 29, 2009 1:17 pm
by Ergonyx
Though this may seem strange, I look straight down and zoom in almost to first person. When I did the route for my harvest bot, I made it so my character was centered in every node. This makes the node large, always centered, and keeps the camera in place.