AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Projekte [Spiel] 3D Race (v1.2.6.13-Alpha)
Thema durchsuchen
Ansicht
Themen-Optionen

[Spiel] 3D Race (v1.2.6.13-Alpha)

Ein Thema von AndY92 · begonnen am 22. Mär 2007 · letzter Beitrag vom 4. Apr 2007
 
AndY92
(Gast)

n/a Beiträge
 
#33

Re: [Spiel] 3D Race (v1.2.6.13-Alpha)

  Alt 27. Mär 2007, 21:25
hey wer bin ich denn ich würd nie aufgeben


Zitat von AndY92:
...also lass ichs mit der mprojekt erstmal sein und mach an was anderem weiter...




Edit:

mom hier mal der Problematische Teil
Delphi-Quellcode:

procedure TForm1.Timer1Timer(Sender: TObject);
var anz: Integer;
begin

Scr.Canvas.Rectangle(0,0,Scr.Width,Scr.Height);

Scr.Canvas.Pen.Color := clBlack;



/////Auto zeichnen////

psi := pi * (ZAxe / 180);
theta := pi *(YAxe / 180);
phi := pi * (XAxe / 180);

for anz := 1 to 21 do
  begin
        X := cos(psi) * Xa[anz] + sin(psi) * Ya[anz];
        Y := -sin(psi) * Xa[anz] + cos(psi) * Ya[anz];
        Z := Za[anz];

        Xalt := X;
        Yalt := Y;
        Zalt := Z;

        X := cos(theta) * XAlt - sin(theta) * ZAlt;
        Z := sin(theta) * XAlt + cos(theta) * ZAlt;

        Xalt := X;
        Yalt := Y;
        Zalt := Z;

        Y := cos(phi) * Yalt + sin(phi) * Zalt;
        Z := -sin(phi) * Yalt + cos(phi) * Zalt;

          If anz = 1 then
            begin
              XBew[0] := X;
              YBew[0] := Y;
              ZBew[0] := Z;
            end;


    X2D := X*e11 + Y*e12 + Z*e13;
    X2Db := trunc(faktor * X2D + PosX2D);

    Y2D := X*e21 + Y*e22 + Z*e23;
    Y2Db := trunc(PosY2D - faktor * Y2D);

    Scr.Canvas.MoveTo(X2Db,Y2Db);



        X := cos(psi) * Xb[anz] + sin(psi) * Yb[anz];
        Y := -sin(psi) * Xb[anz] + cos(psi) * Yb[anz];
        Z := Zb[anz];

        Xalt := X;
        Yalt := Y;
        Zalt := Z;

        X := cos(theta) * Xalt - sin(theta) * ZAlt;
        Z := sin(theta) * Xalt + cos(theta) * ZAlt;

        Xalt := X;
        Yalt := Y;
        Zalt := Z;

        Y := cos(phi) * Yalt + sin(phi) * Zalt;
        Z := -sin(phi) * Yalt + cos(phi) * Zalt;

          if anz = 1 then
            begin
              XBew[1] := X;
              YBew[1] := Y;
              ZBew[1] := Z;
            end;

    X2D := X*e11 + Y*e12 + Z*e13;
    X2Db := trunc(faktor * X2D + PosX2D);

    Y2D := X*e21 + Y*e22 + Z*e23;
    Y2Db := trunc(PosY2D - faktor * Y2D);

    Scr.Canvas.LineTo(X2Db,Y2Db);
  end;


          //////Differenzvektor//////
          XBew[2] := XBew[1] - XBew[0];
          YBew[2] := YBew[1] - YBew[0];
          ZBew[2] := ZBew[1] - ZBew[0];
          //////////////////////////
so aus dem differenzvektor wird jetz die bewegung ausgerechnet:

Delphi-Quellcode:
  XVer := XVer - XBew[2] * Speed;
  YVer := YVer - YBew[2] * Speed;
  ZVer := ZVer - ZBew[2] * Speed;
kein plan... EIGENDLICH müsste es funktionieren
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:02 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz