GPS Display

Blitz3D Forums/Blitz3D Programming/GPS Display

Nigel Brown(Posted 2004) [#1]
Has anyone done any work with a perspective view of a 2D image? Like the displays you find on some GPS displays. I think the method would plot a map onto a 2D Sprite and then point a camera at it from a drivers eye view. would have to be able to rotate the view as direction is changed.


Rook Zimbabwe(Posted 2004) [#2]
Well you could create an entity and brush it with the texture... if you didn't create a location for it the entity would be at 0,0,0 so you change camera view to 45,0,0 and angle it down... then you are rotating...

but that isn't what you mean... I assume you really mean some sort of HUD display. I suppose you could also do it by creating a sprite and applying the map texture brush to the sprite... Then you simply make sure that the sprite always face the camera flag is OFF and that you set the plane of the sprite correctly... you would have to update it somehow with every movement...

-Z


WolRon(Posted 2004) [#3]
Like Rook said: Use 3D if you can. But if not, then you could still do it I think by just drawing your map to a trapezoidal shape instead of a square one (ie. squash the top part of the image together) to make it look more 3D'ish. A real simple formula could do that.
Something like:
Graphics 640, 480
For Y# = 1 To 100
  For X# = 1 To 300
    If X# < 50
      X2# = X# + ((100 - Y#) / 4)
    Else
      X2# = X# - ((100 - Y#) / 4)
    EndIf
    WritePixel X2# * 2 + 20, Y# + 200, Rand(0, 2000000000)
  Next
Next
WaitKey()
End
Note: the above code is just something quick and dirty for demonstration.