His is different than yours and mine too.
There is no trig in it.
So I think you probably could make a more accurate one.
Printable View
His is different than yours and mine too.
There is no trig in it.
So I think you probably could make a more accurate one.
yeah, maybe we could make one that accounts for mm shift ;)
nvm the nvm keep this going!! and n3ss3s tell me how to account for mm shift!!!!
Sythescape.
Never used it but people have told me that the screen never moves and the minimap is locked.
Without sythescape I can only think of one thing that you could to to make it more accurate.
The higher up on the screen your point is, the higher the y coordinate will be off from what it should be.
This is because even with your camera at the highest angle, you aren't looking straight down at the top of your character's head like you are with the minimap.
n will be a decimal probably > 0 < 1SCAR Code:y:= y - (y * n);
So the higher the y coord is, the more will be taken away from it to even it out.
theres gotta be a way............................................... ..........
like use some killer ddtm or something :rolleyes:
i mean the offset of the mm and mainscreen....
;)
EDIT: woups, sorry about dble post
EDIT: maybe we should look into this!!!
SCAR Code:function GetMMOffset(X1, Y1, X2, Y2: Integer): Extended; //Wizzup modded by Zeph
Var
L, I, C: Integer;
ATPA, gATPA: T2DPointArray;
P, P2: TPoint;
B: TBox;
Ps: TPointArray;
Begin
FindColorsTolerance(Ps, RGBToColor(255, 255, 255), X1, Y1, X2, Y2, 50);
Result := -1.0;
If High(Ps) = -1 Then
Exit;
SortTPAFrom(Ps, Point((550 + 703) / 2, 0)); // Sort it from the center.
ATPA := SplitTPAEx(Ps, 1, 0); //horizontal lines
SortATPASize(ATPA, True); // longest 'line'.
L := High(aTPA);
If L = -1 Then
Exit;
SetLength(gATPA, L + 1);
C := 1;
gATPA[0] := aTPA[0];
P := MiddleTPA(aTPA[0]); // get middle of the line.
For I := 1 To L Do
Begin // this loops adds any points that are in a dist of 10 pixels.
// if vert, then x, hori then y (A wall isn't straight.)
If Length(aTPA[I]) < 4 Then
Continue;
P2 := MiddleTPA(aTPA[I]);
If Abs(P.Y - P2.Y) < 10 Then
Begin
gATPA[C] := aTPA[I];
C := C + 1;
End;
End;
SetLength(gATPA, C);
SetLength(Ps, 0);
Ps := MergeATPA(gATPA); //Combine all the points. within 10pix
B := GetTPABounds(Ps);
SortTPAFrom(Ps, Point((B.X1 + B.X2) / 2, 0)); // sort from center
SetLength(ATPA, 0);
ATPA := SplitTPA(Ps, 3); // split dist three, the left over walls
// were all in Ps, and now we split them again.
SetLength(Ps, 0);
SortATPASize(ATPA, True); // longest wall.
Ps := ATPA[0];
L := High(Ps); //angle getting
Result := ArcTan2(Ps[L].Y - Ps[0].Y, Ps[L].X - Ps[0].X);
while (Result > Pi / 2) do
Result := Result - Pi;
while (Result < -Pi / 2) do
Result := Result + Pi;
{$IFDEF DEBUG} WriteLn('OffsetAngle: ' + FloatToStr(Degrees(Result))); {$ENDIF}
End;