schneller laufen
Übersicht

haschhaseBetreff: schneller laufen |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hallo leute, ich hab mal ne frage, weis einer wie ich mit diesem code schneller laufen kann, hab schon versucht einfach die x,y achse zu steigern, halt das er weiter pro achse geht, ging aber net
und wie kann ich machen das sich die maus net so schell bewegt, wenn ich 89 niedriger stelle, geht nur der winkel für das schauen niedriger danke schonmal im vorraus ![]() Code: [AUSKLAPPEN] AppTitle "Halo2 Blitz3D (c) by HaschHase"
Graphics3D 1024,768,32,1 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,2,2,2 light=CreateLight() RotateEntity light,90,0,0 hud_power = LoadImage("gfx/hud_power.png") MaskImage hud_power,255,255,255 crosshair = LoadImage("gfx/crosshair.png") MaskImage crosshair,255,255,255 terrain=LoadTerrain("gfx/terrain.bmp") TerrainDetail terrain,4000,True ScaleEntity terrain,1,50,1 grass_tex=LoadTexture("gfx/terrain-t.jpg") ScaleTexture grass_tex,50,50 EntityTexture terrain,grass_tex,0,1 Global marine=LoadMesh("models/marine.3DS") ScaleEntity marine,0.2,0.2,0.2 While Not KeyHit(1) mouse# = MouseYSpeed() If KeyDown(203)=1 Then x#=x#-0.2 If KeyDown(205)=1 Then x#=x#+0.2 If KeyDown(208)=1 Then y#=y#-0.2 If KeyDown(200)=1 Then y#=y#+0.2 If KeyDown(44)=1 Then z#=z#-0.2 If KeyDown(30)=1 Then z#=z#+0.2 If KeyDown(205)=1 Then TurnEntity camera,0,-1,0 If KeyDown(203)=1 Then TurnEntity camera,0,1,0 If KeyDown(208)=1 Then MoveEntity camera,0,0,-0.1 If KeyDown(200)=1 Then MoveEntity camera,0,0,0.1 x#=EntityX(camera) y#=EntityY(camera) z#=EntityZ(camera) terra_y#=TerrainY(terrain,x#,y#,z#)+4 PositionEntity camera,x#,terra_y#,z# If EntityPitch(camera) - mouse > -89 Then RotateEntity camera, EntityPitch(camera) + mouse, EntityYaw(camera), 0 Else RotateEntity camera, -89, EntityYaw(camera), 0 EndIf If EntityPitch(camera) + mouse < 89 Then RotateEntity camera, EntityPitch(camera) + Mouse, EntityYaw(camera), 0 Else RotateEntity camera, 89, EntityYaw(camera), 0 EndIf RotateEntity camera, EntityPitch(camera), EntityYaw(camera) + MouseXSpeed()*-1, 0 UpdateWorld() RenderWorld() DrawImage hud_power,20,20,0 DrawImage crosshair,512,383 Text 0,0,EntityPitch(camera) + mouse MoveMouse GraphicsWidth() / 2, GraphicsHeight() / 2 Flip Wend End |
||
nei nei so kann das nicht weitergehen... |
![]() |
Markus2 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Global camp=CreatePivot()
Global cam=CreateCamera(camp) camp bewegst du nur x,y,z und drehst nur um Yaw also Y Achse cam nur Pitch ändern also X Achse Also laufen und drehen mit camp . Hoch Runter gucken mit cam . |
||
![]() |
Markus2 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Beim hoch/runter gucken noch den Winkel (Pitch der Cam) abfragen
und begrenzen . Code: [AUSKLAPPEN] Graphics3D 640,480,16,2 Global camp=CreatePivot() Global cam=CreateCamera(camp) AmbientLight 64,64,64 MoveEntity camp,0,10,-10 ;nach oben und nach hinten TurnEntity cam,20,0,0 ;runter gucken Global cube=CreateCube() EntityColor cube,255,0,0 MoveEntity cube,0,1,0 Global plane=CreatePlane() EntityColor plane,255,255,0 While Not KeyHit(1) mx=MouseX() my=MouseY() mspx#=MouseXSpeed() mspy#=MouseYSpeed() TurnEntity camp,0,-mspx/10.0,0 ;If MouseDown(1) Then TurnEntity cam,1,0,0 ;runter gucken ;If MouseDown(2) Then TurnEntity cam,-1,0,0 ;hoch gucken TurnEntity cam,mspy/10.0,0,0 If KeyDown(200) Then ;vor MoveEntity camp,0,0,1 EndIf If KeyDown(208) Then ;zurück MoveEntity camp,0,0,-1 EndIf If (mx<100 Or mx >GraphicsWidth()-100) Or (my<100 Or my >GraphicsHeight()-100) MoveMouse GraphicsWidth()/2,GraphicsHeight()/2 EndIf RenderWorld Flip Wend End |
||
haschhase |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hab das ganze einfach durch
Code: [AUSKLAPPEN] If KeyDown(200)=1 Then MoveEntity camera, 0, 0, .2
gelöst ![]() aber trotzdem danke |
||
nei nei so kann das nicht weitergehen... |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group