Problem mit Kollisionsindex
Übersicht

BlitzBasic303Betreff: Problem mit Kollisionsindex |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hi,
Ich hab ein Problem mit dem Kollisionsindex, hier mal ein Beispiel Code: [AUSKLAPPEN] Surface=CollisionSurface(Bahn,1) So, da kommt nun immer "Collision Index out of range" aber der Kollisionsindex beginnt doch bei 1, ich kann auch statt der 1 CountCollisions nehmen, die gleiche Meldung kommt... Woran liegt das? Mfg BlitzBasic303 |
||
![]() |
hecticSieger des IS Talentwettbewerb 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Vielleicht ql:CountSurfaces nehmen? | ||
Download der Draw3D2 V.1.1 für schnelle Echtzeiteffekte über Blitz3D |
BlitzBasic303 |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Anstatt CollisionSurface? Ne, ich will ja genau den kollidierten Surface haben. | ||
![]() |
hecticSieger des IS Talentwettbewerb 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Anstelle CountCollisions, wie du es da oben stehen hast. | ||
Download der Draw3D2 V.1.1 für schnelle Echtzeiteffekte über Blitz3D |
BlitzBasic303 |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Geht aber auch nicht...
Also das geht: Surf=CollisionSurface(Ball,CountCollisions(Ball)) aber ich will ja das Surface von der Bahn also eigentlich Surf=CollisionSurface(Bahn,CountCollisions(Bahn)) Nur das geht nicht... |
||
BlitzBasic303Betreff: RE: |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Ich bins nochmal,
also es ist ja eigentlich ganz klar wieso das nichts geht, die Kugel kollidiert mit der Bahn, nicht die Bahn mit der Kugel, aber wie kann man es den sonst lösen? Ich hab hier mal mein Code für euch: Code: [AUSKLAPPEN] Graphics3D 1024,768,32,1 SetBuffer BackBuffer() Camera=CreateCamera() MoveEntity camera,0,1000,0 CameraRange camera,1,10000 ball=LoadMesh("Ball.3ds") RotateEntity ball,0,45,0 EntityType ball,1 Bahn=LoadMesh("Bahn1.3ds") EntityType Bahn,2 While Not KeyHit(1) Collisions 1,2,2,1 Collisions 3,2,2,1 PointEntity camera,ball MoveEntity ball,0,0,1 If EntityCollided(Ball,2) Then Vertex1=TriangleVertex(CollisionSurface(Bahn,CountCollisions(bahn)),CollisionTriangle(Bahn,CountCollisions(bahn)),1) Vertex2=TriangleVertex(CollisionSurface(Bahn,CountCollisions(bahn)),CollisionTriangle(Bahn,CountCollisions(bahn)),2) If VertexX(CollisionSurface(Bahn,CountCollisions(bahn)),Vertex1)=VertexX(CollisionSurface(Bahn,CountCollisions(bahn)),Vertex2) Then RuntimeError "180" Else If VertexZ(CollisionSurface(Bahn,CountCollisions(bahn)),Vertex1)=VertexZ(CollisionSurface(Bahn,CountCollisions(bahn)),Vertex2) Then RuntimeError "360" End If End If RenderWorld UpdateWorld Flip Wend End bitte helft mir! |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group