CS2D steuerung
Übersicht

![]() |
Progger93Betreff: CS2D steuerung |
![]() Antworten mit Zitat ![]() |
---|---|---|
Ich hab ein Problem:
Ich hab eine 2D Tilemap und brauche jetzt die Steuerung. Ich hätte gern so eine wie in CS2D also schräg laufen und nicht immer ein ganzes Tile laufen, aber ich weiß nicht wie man so etwas macht. das is der Code den ich bisher hingekriegt habe: Code: [AUSKLAPPEN] ;_____________________Bewegungsrutinen für die einzelnen pfeil-tasten________________________________ ;rechs-taste If KeyDown(205) If map(px+1,py) < 6 Then scrollx = scrollx + 2 ppx = ppx + 2 xr = xr + 1 If xr = 16 Then px = px + 1:xr = 0 End If End If ;links-taste If KeyDown(203) If map(px-1,py) < 6 Then scrollx = scrollx - 2 ppx = ppx - 2 xl = xl + 1 If xl = 16 Then px = px - 1:xl = 0 End If End If ;oben-taste If KeyDown(200) Then If map(px,py-1) < 6 Then scrolly = scrolly - 2 ppy = ppy - 2 xo = xo - 1 If xo = 16 Then py = py - 1:xo = 0 End If End If ;unten-taste If KeyDown(208) Then If map(px,py+1) < 6 Then scrolly = scrolly + 2 ppy = ppy + 2 xo = xo + 1 If xo = 16 Then py = py + 1:xo = 0 End If End If Wäre schön wenn ihr mir helfen könntet Schonmal Danke im Vorraus Progger12 Edit: Das haupt problem ist die nicht funktionierende Kollision. |
||
- Zuletzt bearbeitet von Progger93 am Do, Jun 28, 2007 17:18, insgesamt 2-mal bearbeitet
ChristianK |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Such mal nach ATan, Sin, Cos usw.
Hier gibt es ein paar Beiträge zu dem Thema. |
||
![]() |
D2006Administrator |
![]() Antworten mit Zitat ![]() |
---|---|---|
Schau dir mal das hier an:
http://www.chaos-interactive.de/tuts/winkel.html |
||
Intel Core i5 2500 | 16 GB DDR3 RAM dualchannel | ATI Radeon HD6870 (1024 MB RAM) | Windows 7 Home Premium
Intel Core 2 Duo 2.4 GHz | 2 GB DDR3 RAM dualchannel | Nvidia GeForce 9400M (256 MB shared RAM) | Mac OS X Snow Leopard Intel Pentium Dual-Core 2.4 GHz | 3 GB DDR2 RAM dualchannel | ATI Radeon HD3850 (1024 MB RAM) | Windows 7 Home Premium Chaos Interactive :: GoBang :: BB-Poker :: ChaosBreaker :: Hexagon :: ChaosRacer 2 |
![]() |
Progger93Betreff: Problem ist kollision |
![]() Antworten mit Zitat ![]() |
---|---|---|
Das problem ist ja gar nicht die Steuerung selbst sondern die Kollision auf einer 2D Tilemap! | ||
MfG Pascal
Win 7|T7250@2.0Ghz|3GB RAM|M8600GT |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group