Gondel parent Problem

Übersicht BlitzBasic Blitz3D

Neue Antwort erstellen

 

Joscha

Betreff: Gondel parent Problem

BeitragDo, Dez 11, 2008 22:42
Antworten mit Zitat
Benutzer-Profile anzeigen
Hallo
Hab ein Problem:
Ich Versuch mich in einen mini Ego shooter Very Happy
und jetzt möchte ich in eine Gondel steigen können.

Code: [AUSKLAPPEN]

   GO=GO+1
   If EntityDistance (man\m,gondel) <10 Then
      EntityParent man\m,gondel
   End If
   
   If EntityDistance(man\m,gondel) >10 Then
      EntityParent man\m,0
   End If

   If GO=200 Then GON=1
   If GO=400 Then GON=2
   If GO=600 Then GON=3    
   If GO=800 Then GON=0 
   If GO>801 Then GO=0
   
   If GON=1 MoveEntity gondel,-0.3,0,0
   If GON=3 MoveEntity gondel,0.3,0,0

aber das Problem ist wenn ich in die Nähe der Gondel komme dann fängt der Bildschirm an "durch zu drehen" und es Funktioniert auch dann noch nicht mit dem EntityParent. Confused
Was habe ich falsch gemacht? oder hat jemand eine andere Idee wie das Funktionieren könnte?
mfg
Joscha
 

Krischan

BeitragFr, Dez 12, 2008 16:11
Antworten mit Zitat
Benutzer-Profile anzeigen
Ich würde anstatt parenting eher die Playerposition an die der Gondel anpassen. Positionentity oder Translateentity.
 

Joscha

BeitragMo, Dez 15, 2008 18:02
Antworten mit Zitat
Benutzer-Profile anzeigen
Danke für denn Tipp es funktioniert hervorragend: Very Happy
Code: [AUSKLAPPEN]

GO=GO+1
If EntityDistance (man\m,gondel)<10 Then
on=1
End If

If EntityDistance (man\m,gondel)>10 Then
on=0
End If

If GO=200 Then GON=1
If GO=400 Then GON=2
If GO=600 Then GON=3
If GO=800 Then GON=0
If GO>801 Then GO=0

If GON=1 Then
MoveEntity gondel,0,0,0.3
EndIf

If GON=3 Then
MoveEntity gondel,0,0,-0.3
EndIf

If GON=1 And on=1 Then TranslateEntity man\m,0,0,0.3,1

If GON=3 And on=1 Then TranslateEntity man\m,0,0,-0.3,1

Neue Antwort erstellen


Übersicht BlitzBasic Blitz3D

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group