Kollision wird nicht überprüft...
Übersicht

![]() |
the FR3AKBetreff: Kollision wird nicht überprüft... |
![]() Antworten mit Zitat ![]() |
---|---|---|
Wenn meine Gegner auf mich schießen und ich hinter einer Mauer oder so stehe,können mich die Schüsse trotzdem treffen ![]() Hier mal der Code mit Kollisionsabfrage und Einschusslöcherpositionierung: Code: [AUSKLAPPEN] If EntityCollided(e\modelb,scene) Then
For o=1 To CountCollisions( e\modelb ) If GetEntityType( CollisionEntity( e\modelb,o ) )=SCENE cx#=CollisionX( e\modelb,o ) cy#=CollisionY( e\modelb,o ) cz#=CollisionZ( e\modelb,o ) nx#=CollisionNX( e\modelb,o ) ny#=CollisionNY( e\modelb,o ) nz#=CollisionNZ( e\modelb,o ) th.Hole=New Hole th\alpha=1 th\sprite=CopyEntity( hole_sprite ) PositionEntity th\sprite,cx,cy,cz AlignToVector th\sprite,-nx,-ny,-nz,3 MoveEntity th\sprite,0,0,-.1 End If Next Delete e FreeEntity modelb Exit End If |
||
![]() |
StepTiger |
![]() Antworten mit Zitat ![]() |
---|---|---|
am code seh ich kein problem aber was soll das exit da?
Allerdings wird wohl das Problem darin liegen, dass du die Kugeln zu schnell bewegst oder Collisions nicht (richtig) gesetzt ist. |
||
Noch gestern standen wir am Abgrund, doch heute sind wir schon einen Schritt weiter.
Computer: AMD Sempron 3000+; ATI Radeon 9800 Pro; 512 MB DDR RAM 400Mhz; Asus E7N8X-E Deluxe; Samsung 200GB HD 5.4ns acces t Gewinner: BP Code Compo #2 Π=3.141592653589793238...<--- und das aus dem kopf ![]() Seit der Earthlings-Diskussion überzeugter Fleisch(fr)esser. |
![]() |
Silver_Knee |
![]() Antworten mit Zitat ![]() |
---|---|---|
Ähm hab ich jetzt was falsch verstanden oder du??
Code: [AUSKLAPPEN] entity2 =Entitycollided(entity1,type_of_entity2)
also entweder der Befehl oder so ein block mit CountColisions etc... ich kenne übrigens dein problem: Agent... da konntest du ne zeitlang durch wand und boden gehen.... Ich glaube die beiden Befehle blockieren sich irgedwie gegenseitig ich hatte das darmals gelöst indem ich das Entitycollide weggelassen hab... Code: [AUSKLAPPEN] bumm=False
For o=1 To CountCollisions( e\modelb ) If GetEntityType( CollisionEntity( e\modelb,o ) )=SCENE cx#=CollisionX( e\modelb,o ) cy#=CollisionY( e\modelb,o ) cz#=CollisionZ( e\modelb,o ) nx#=CollisionNX( e\modelb,o ) ny#=CollisionNY( e\modelb,o ) nz#=CollisionNZ( e\modelb,o ) th.Hole=New Hole th\alpha=1 th\sprite=CopyEntity( hole_sprite ) PositionEntity th\sprite,cx,cy,cz AlignToVector th\sprite,-nx,-ny,-nz,3 MoveEntity th\sprite,0,0,-.1 bumm=True End If Next If bumm Delete e FreeEntity modelb Exit EndIf |
||
![]() |
the FR3AK |
![]() Antworten mit Zitat ![]() |
---|---|---|
Ich hab jetzt mal EntityVisible benutzt...das geht besser aber leider ist es SEHR LANGSAM!
Habt ihr eine bessere Idee wie man ein gutes Sichtfeld machen kann? |
||
![]() |
FireballFlame |
![]() Antworten mit Zitat ![]() |
---|---|---|
Mit LinePick oder auch CameraPick kann man so etwas prüfen.
Das Tempo ist aber auch hier eine andere Frage. |
||
PC: Intel Core i7 @ 4x2.93GHz | 6 GB RAM | Nvidia GeForce GT 440 | Desktop 2x1280x1024px | Windows 7 Professional 64bit
Laptop: Intel Core i7 @ 4x2.00GHz | 8 GB RAM | Nvidia GeForce GT 540M | Desktop 1366x768px | Windows 7 Home Premium 64bit |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group