kamera kolision
Übersicht

![]() |
Mathias-KwiatkowskiBetreff: kamera kolision |
![]() Antworten mit Zitat ![]() |
---|---|---|
hi wie bekomme ich den volgendes raus=?
ich habe keine spielfigur, meine kamera kolidiert mit einem haus, wie kann ich nun das unterbinden das man durch dem haus durchläuft, den ich habe keine spielfigur... Code: [AUSKLAPPEN] Graphics3D 640,480,32,1 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,1,0 light=CreateLight() RotateEntity light,90,0,0 terrain=CreateTerrain(4096) grass_tex=LoadTexture("grass.bmp") tex=LoadTexture("text.bmp") St=LoadTexture("str.bmp") him=LoadTexture("him.bmp") EntityTexture terrain,grass_tex drum=LoadMesh("haus.3ds") PositionEntity drum,16,0,MeshDepth(drum)*2 drum1=LoadMesh("haus2.3ds") PositionEntity drum1,16,0,MeshDepth(drum)*2+25 drum2=LoadMesh("block.3ds") PositionEntity drum2,36,0,MeshDepth(drum)*2+25 himmel=LoadMesh("himmel.3ds") PositionEntity himmel,0,55,MeshDepth(drum)*0 EntityTexture himmel,him cube=CreateCube() cub=CreateCube() PositionEntity cube,3.7,0,12 PositionEntity cub,16.7,0,12 ScaleEntity cube,1,0.05,12 ScaleEntity cub,12,0.05,1 EntityTexture cube,st EntityTexture cub,st While Not KeyHit(1) AntiAlias 1 If KeyDown(205)=1 Then TurnEntity camera,0,-1.5,0 If KeyDown(203)=1 Then TurnEntity camera,0,1.5,0 If KeyDown(208)=1 Then MoveEntity camera,0,0,-0.08 If KeyDown(200)=1 Then MoveEntity camera,0,0,0.08 Collisions camera,drum1,3,1 RenderWorld UpdateWorld Text 0,0,"Benutze maus..." Flip Wend End |
||
Tugend GleichmutBetreff: Re: kamera kolision |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hey, ich hatte heut morgen das gleiche Prob. Ansich musst du collision mit der camera genauso machen wie mit allem anderen. Also definierst du für die Cam einen Entitytype,und ein für die drums und TADA es funzt!
Code: [AUSKLAPPEN] Graphics3D 640,480,32,1 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,1,0 light=CreateLight() RotateEntity light,90,0,0 terrain=CreateTerrain(4096) grass_tex=LoadTexture("grass.bmp") tex=LoadTexture("text.bmp") St=LoadTexture("str.bmp") him=LoadTexture("him.bmp") EntityTexture terrain,grass_tex drum=LoadMesh("haus.3ds") PositionEntity drum,16,0,MeshDepth(drum)*2 drum1=LoadMesh("haus2.3ds") PositionEntity drum1,16,0,MeshDepth(drum)*2+25 drum2=LoadMesh("block.3ds") PositionEntity drum2,36,0,MeshDepth(drum)*2+25 himmel=LoadMesh("himmel.3ds") PositionEntity himmel,0,55,MeshDepth(drum)*0 EntityTexture himmel,him cube=CreateCube() cub=CreateCube() PositionEntity cube,3.7,0,12 PositionEntity cub,16.7,0,12 ScaleEntity cube,1,0.05,12 ScaleEntity cub,12,0.05,1 EntityTexture cube,st EntityTexture cub,st So, neu wäre jetzt folgendes: Code: [AUSKLAPPEN] drumstype=1;wichtig!! muss größer als null sein! type_cam=1;^^ entitytype camera,type_cam entitytype drum,drumstype entitytype drum1,drumstype entitytype drum2,drumstype Code: [AUSKLAPPEN] While Not KeyHit(1) AntiAlias 1 If KeyDown(205)=1 Then TurnEntity camera,0,-1.5,0 If KeyDown(203)=1 Then TurnEntity camera,0,1.5,0 If KeyDown(208)=1 Then MoveEntity camera,0,0,-0.08 If KeyDown(200)=1 Then MoveEntity camera,0,0,0.08 Collisions type_cam,drumstype1,3,1;Hier wurde auch was geändert!!! RenderWorld UpdateWorld Text 0,0,"Benutze maus..." Flip Wend End |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group