Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Kennt hier Jemand die Function NewtoncreateCompoundCollision (https://www.delphipraxis.net/71278-kennt-hier-jemand-die-function-newtoncreatecompoundcollision.html)

Corpsman 12. Jun 2006 15:42

Re: Kennt hier Jemand die Function NewtoncreateCompoundColli
 
Hat wohl doch noch was gefehlt

Die Nil Pointer bei

NewtonCreateBox sorgen dafür das wir 2 Boxen Haben die Genau übereinander sind.

Ändert man das aber in

Delphi-Quellcode:
  Matrix[0, 0] := 1;
  Matrix[0, 1] := 0;
  Matrix[0, 2] := 0;
  Matrix[0, 3] := 0;
  Matrix[1, 0] := 0;
  Matrix[1, 1] := 1;
  Matrix[1, 2] := 0;
  Matrix[1, 3] := 0;
  Matrix[2, 0] := 0;
  Matrix[2, 1] := 0;
  Matrix[2, 2] := 1;
  Matrix[2, 3] := 0;
  Matrix[3, 0] := 1;
  Matrix[3, 1] := 0;
  Matrix[3, 2] := 1;
  Matrix[3, 3] := 1;
  Collision1 := NewtonCreateBox(NewtonWorld, 1, 1, 1, @Matrix[0, 0]);
  Matrix[0, 0] := 1;
  Matrix[0, 1] := 0;
  Matrix[0, 2] := 0;
  Matrix[0, 3] := 0;
  Matrix[1, 0] := 0;
  Matrix[1, 1] := 1;
  Matrix[1, 2] := 0;
  Matrix[1, 3] := 0;
  Matrix[2, 0] := 0;
  Matrix[2, 1] := 0;
  Matrix[2, 2] := 1;
  Matrix[2, 3] := 0;
  Matrix[3, 0] := -1;
  Matrix[3, 1] := 0;
  Matrix[3, 2] := -1;
  Matrix[3, 3] := 1;
  Collision2 := NewtonCreateBox(NewtonWorld, 1, 1, 1, @Matrix[0, 0]);
So scheint es ein Anderes Object zu geben, die Frage ist nur was kommt da nun bei Raus, laut Renderfunction scheint es nun aber endlich zu functionieren.

THX to all

TurboMartin 13. Jun 2006 14:37

Re: Kennt hier Jemand die Function NewtoncreateCompoundColli
 
hast du denn auch
Delphi-Quellcode:
type
  TCollisionPrimitiveArray = array of PNewtonCollision;
angegeben?

Corpsman 13. Jun 2006 15:51

Re: Kennt hier Jemand die Function NewtoncreateCompoundColli
 
Jap Hab ich,

Es functioniert nun wunderbar.

Das einzige Prob ist das ich noch net so richtig raushabe wie man den Inertia Vektor nun vernünftig berechnet.

Habe das Ganze aber schon in eine Klasse ausgliedern können. bei Der ich den Inertia Vektor einfach nachträglich verändern kann, so kann ich es durch "Ausprobieren" jedesmal ermitteln.

Die Klasse lade ich dann auch hoffentlich bald auf meine HP so das man sich das dann alles sauber Programmiert und Kommentiert ansehen kann.

Vielen Dank an alle.

Corpsman


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:00 Uhr.
Seite 2 von 2     12   

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