Kollision funzt nur bei einem Mesh!

Übersicht BlitzBasic Blitz3D

Neue Antwort erstellen

 

FBI-blitz

Betreff: Kollision funzt nur bei einem Mesh!

BeitragMi, Feb 16, 2005 19:04
Antworten mit Zitat
Benutzer-Profile anzeigen
Hi,

ich habe meine Levels für ein kleines 3D-Spiel in ner txt gespeichert. Jetzt liest mein Prog aus, welches Mesh geladen werden soll, und welchen Typ und welchen Radius es haben soll! Die Kollision funzt allerdings nur bei dem Mesh, das zuerst geladen wird! Bei den anderen funzts net!
Kann mir jemand helfen?

Code: [AUSKLAPPEN]

;Kollision
 Collisions 1, 2, 1, 1 ;Kollision aktivieren
 col = CountCollisions(cam(1))
UpdateWorld


Und meine zweite Frage: Kann ich es auch so machen, dass bei ner Kollision GAR NICHTS die Reaktion ist? Wenn ich bei Reag 0 angeb, dann rutscht die Kamera bei Kollision nach oben!

Danke schon jetzt!
FBI-blitz
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+
Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+
 

Darren

BeitragMi, Feb 16, 2005 19:56
Antworten mit Zitat
Benutzer-Profile anzeigen
Lädst du auch alles so, wie du es speicherst? Also in der gleichen Reihenfolge
MFG Darren
 

FBI-blitz

BeitragMi, Feb 16, 2005 20:01
Antworten mit Zitat
Benutzer-Profile anzeigen
Ja! Sonst würde es ja auch mit dem 1. Mesh net funzen!
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+
Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+
 

Darren

BeitragMi, Feb 16, 2005 20:22
Antworten mit Zitat
Benutzer-Profile anzeigen
zeig doch mal deine speicher und lade routine
MFG Darren
 

FBI-blitz

BeitragMi, Feb 16, 2005 20:32
Antworten mit Zitat
Benutzer-Profile anzeigen
Code: [AUSKLAPPEN]
Leveldatei = OpenFile("Data\Level\Level1.mge")

Levelname$ = ReadLine(Leveldatei)
temp = Int(readline(Leveldatei))
If temp = 1 Then
 cubefliptextur = LoadTexture(readline(Leveldatei))
 cubeflip = CreateCube()



;Kameras
kamerazahl = Int(ReadLine(Leveldatei))
kamerazahl2 = kamerazahl + 1
Dim cam(kamerazahl2)


campivot = CreatePivot()




;Aus der Leveldatei lesen:

For temp = 1 To Int(kamerazahl)
 cam(temp) = CreateCamera(campivot)
  PositionEntity cam(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  CameraViewport cam(temp), 0,0,xbildschirm, ybildschirm
  CameraClsColor cam(temp), 0, 0, 0
  CameraRange cam(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  CameraFogMode cam(temp), 1
  CameraFogRange cam(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  CameraFogColor cam(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
Next

EntityType cam(1), 2
EntityRadius cam(1), 2


lichtzahl = Int(ReadLine(Leveldatei))
Dim licht(lichtzahl+1)

For temp = 1 To lichtzahl
 licht(temp) = CreateLight(Int(ReadLine(leveldatei)))
  PositionEntity licht(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  LightColor licht(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  LightRange licht(temp), Int(ReadLine(leveldatei))
Next

;Sprites


spritezahl = Int(ReadLine(leveldatei))
Dim sprites(spritezahl+1)

For temp = 1 To spritzahl
 sprite(temp) = LoadSprite(ReadLine(leveldatei))
  PositionEntity sprite(temp), Int(ReadLine(leveldatei)),   Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  Next



;Meshes
meshzahl = Int(ReadLine(leveldatei))
Dim mesh(meshzahl+1)
Dim meshtextur(meshzahl+1)
Dim meshbeschreibung$(meshzahl+1)


For temp = 1 To meshzahl
 mesh(temp) = LoadMesh(ReadLine(leveldatei))
  EntityType mesh(temp), 1
  temmmp = ReadLine(leveldatei)
  meshbeschreibung(temp) = ReadLine(leveldatei)
  PositionEntity mesh(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  ScaleEntity mesh(temp), Float(ReadLine(leveldatei)), Float(ReadLine(leveldatei)), Float(ReadLine(leveldatei))
  TurnEntity mesh(temp), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei)), Int(ReadLine(leveldatei))
  If Int(readline(leveldatei)) = 1 Then
   meshtextur(temp) = LoadTexture(readline(leveldatei))
   EntityTexture mesh(temp), meshtextur(temp)
  EndIf
Next


Ja ich weiß, is vielleicht net der beste Code, aber is ja noch zu bessern Wink

Hier die TXT:

Zitat:
LEVELNAME
1
gfx\Texturen\kacheln003.jpg
1
1.5
3.0
1.5
1
20
10
22
0
0
0
4
2
1
1
1
20
20
20
64
2
64
1
64
10
10
10
1
2
1
1
64
-5
-5
-5
64
2
64
1
1
-5
-5
-5
64
1
gfx\Grafiken\Nebel.bmp
1
1
1
5
gfx\3D\Rikscha\rikscha.3ds
1
Eine Rikscha. Nichts besonderes!
2
2
2
0.008
0.008
0.008
0
0
0
0
gfx\3D\Schreibtischstuhl\CHAIR4.3DS
1
Mein Schreibtischstuhl. Sehr bequem. Nichts besonderes!
50
2
2
0.005
0.004
0.004
0
0
0
0
gfx\3D\Schreibtischstuhl\CHAIR4.3DS
1
Noch ein Stuhl. Das gleiche Modell wie mein eigener Stuhl!
0
0
0
0.08
0.08
0.08
0
0
0
0
gfx\3D\Tuer\tuer.3DS
1
Die Tür führt nach draußen auf die Straße.
0
0
0
0.09
0.09
0.09
0
0
0
1
gfx\Texturen\holz021.jpg
gfx\3D\Tasse\CUP.3DS
1
Eine Kaffetasse!
6
0
5
1
1
1
0
0
0
0
Data\Level\Terrains\Level1.bmp
2
gfx\Texturen\boden.jpg
1
1
1
2
2
2
[/code][/syntax]
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+
Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+
 

FBI-blitz

BeitragMi, Feb 16, 2005 23:03
Antworten mit Zitat
Benutzer-Profile anzeigen
KEINER DA???

Kann mir keiner helfen? Ich komm nicht weiter!!! Crying or Very sad Crying or Very sad
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+
Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+

Neue Antwort erstellen


Übersicht BlitzBasic Blitz3D

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group