Can any one help me out with my list of questions below...
How do I detect a key press (up then down) at the moment I would do it as follows but this locks up the game till the button is released (not good)
If DarkGDK.IO.Keyboard.Up Then
DefaultCamera.MoveForward(1)
Do Until DarkGDK.IO.Keyboard.Up = False
Loop
End If
How do I get the light to follow the player?
I tried
Lighting.Light.Position(DefaultCamera.CurrentPositionX, DefaultCamera.CurrentPositionY, DefaultCamera.CurrentPositionZ)
But this does not seem to have much affect.
Also

not sure if anyone can help with this but my game is made up of cubes (15,10,15) I want my camera to be in the centre of on of there cubes which I can do but as you spin round the camera will go though a wall
here is a bit of example code..
Dim PlayerCube As DarkGDK.Basic3D.Cube
PlayerCube = New DarkGDK.Basic3D.Cube(1)
PlayerCube.SetCollisionToPolygons()
Dim LastPosision As Point3D
DarkGDK.Camera.DefaultCamera.ColorBackdrop(Color.Black)
DarkGDK.Camera.DefaultCamera.AutoCamOff()
DarkGDK.Camera.DefaultCamera.SetRange(1, 25)
DefaultCamera.SetFieldOfView(50)
DarkGDK.Camera.DefaultCamera.PositionCurrent(2.5, 0, 1.5)
DarkGDK.Camera.DefaultCamera.PointCurrent(2.5, 0, 0)
Dim WallArray As New ArrayList
' Create a cube, 15x10x15 units in size, and wrap the texture
' onto the cube
For x = 0 To 50
For y = 0 To 50
If (x = 0) Or (x = 50) Or (y = 0) Or (y = 50) Then
cube = New DarkGDK.Basic3D.Cube(10, texture)
cube.Scale(15, 10, 15)
cube.Position(x * 1.5, 0, y * 1.5)
'cube.Rotate(180, 0, 0)
cube.AffectedByAnyLights = True
cube.WireFrame = False
cube.AffectedByAmbientLightLevel = True
cube.SetCollisionToBoxes()
WallArray.Add(cube)
Else
FloorTile = New DarkGDK.Basic3D.Plane(1.5, 1.5, textureFloor)
FloorTile.Position(x * 1.5, -0.5, y * 1.5)
FloorTile.Rotate(90, 0, 0)
FloorTile.AffectedByAmbientLightLevel = True
FloorTile.AffectedByAnyLights = True
RoofTile = New DarkGDK.Basic3D.Plane(1.5, 1.5, textureRoof)
RoofTile.Position(x * 1.5, 0.5, y * 1.5)
RoofTile.Rotate(90, 0, 0)
FloorTile.AffectedByAnyLights = True
End If
Next
Next
While DarkGDK.Engine.LoopGDK()
' Rotate our cube along it's Y axis
LastPosision.X = DefaultCamera.CurrentPositionX
LastPosision.Y = DefaultCamera.CurrentPositionY
LastPosision.Z = DefaultCamera.CurrentPositionZ
If DarkGDK.IO.Keyboard.Up Then
DefaultCamera.MoveForward(1)
Do Until DarkGDK.IO.Keyboard.Up = False
Loop
End If
If DarkGDK.IO.Keyboard.Down Then
DefaultCamera.MoveBackward(1)
Do Until DarkGDK.IO.Keyboard.Down = False
Loop
End If
If DarkGDK.IO.Keyboard.Left Then
DefaultCamera.TurnLeft(90)
Do Until DarkGDK.IO.Keyboard.Left = False
Loop
End If
If DarkGDK.IO.Keyboard.Right Then
DefaultCamera.TurnRight(90)
Do Until DarkGDK.IO.Keyboard.Right = False
Loop
End If
PlayerCube.Position(DefaultCamera.CurrentPositionX, DefaultCamera.CurrentPositionY, DefaultCamera.CurrentPositionZ)
For Each Wall As Basic3D.Cube In WallArray
If PlayerCube.Collision(Wall) Then
DarkGDK.Text.ShowText(0, 31, "Collision Detected!")
DefaultCamera.PositionCurrent(LastPosision.X, LastPosision.Y, LastPosision.Z)
End If
If DarkGDK.IO.Mouse.Pick(Wall) Then
Wall.Ambience = Color.Blue
Else
Wall.Ambience = Color.White
End If
Next
Lighting.Light.ColorAmbient(Color.White)
Lighting.Light.FogDistance(10)
Lighting.Light.FogColor(Color.Black)
Lighting.Light.FogOn()
Lighting.Light.Position(DefaultCamera.CurrentPositionX, DefaultCamera.CurrentPositionY, DefaultCamera.CurrentPositionZ)
DarkGDK.Text.ShowText(0, 0, "RUNNING" & " " & DarkGDK.Display.ScreenFPS)
DarkGDK.Text.ShowText(0, 51, "Memory" & " " & DarkGDK.Core.TotalMemoryAvailable)
' Tell DarkGDK.NET to render our default camera display
DarkGDK.Core.Sync()
End While