ok i guys thanks to Iain (for the matrix thingy) i have this code:
rem make landscape
make matrix 1, 10000, 10000,50,50
randomize matrix 1, 50
update matrix 1
load image "snow.bmp",1
rem Load stone floor bitmap into image
LOAD BITMAP "snow.bmp",1
GET IMAGE 1,0,0,128,128
DELETE BITMAP 1
rem Texture landscape
PREPARE MATRIX TEXTURE 1,1,1,1
rem Activate and distance fogging
FOG ON
FOG COLOR 0
FOG DISTANCE 1200
rem make character
load object "knight.X", 1
rem Standard conversion for DM2 object use
xrotate object 1,270
fix object pivot 1
rem sync mouse
sync on : hide mouse
`place player near the center of the matrix
position object 1, 500, 5, 500
do
`player movement and turning
if keystate (17) then move object 1, 1
if keystate (31) then move object 1, -1
if keystate (30) then yrotate object 1, object angle y(1) - 1
if keystate (32) then yrotate object 1, object angle y(1) + 1
`store player posuition
x# = object position x(1)
z# = object position z(1)
y# = get ground height(1,x#,z#) + 100
position object 1, x#,y#,z#
`place the camera at the players position and face it the same angles it faces
position camera objx#, objy#, objz#
`set camera to object orientation 1
rotate camera object angle x(1), object angle y(1), object angle z(1)
`move camera straight up
xrotate camera 90
move camera -70
`set camera back to players angles and move it behind him
`set camera to object orientation 1
rotate camera object angle x(1), object angle y(1), object angle z(1)
move camera -170
`draw changes
sync
loop
sync on
and it works fine exept for when my guy moves he goes up in all but he apears very high off the matrix. So in other words it works just fine but my "Knight.x" object apears way above the matrix.
-smart guy
Edit:
ok i got it working:
what i did was take away the +100 from the -
x# = object position x(1)
y# = get ground height(1,x#,z#)[b]+100[/b]
z# = object position z(1)
position object 1,x#,y#,z#
but the camera still wont follow my person around
2nd edit:
sorry for all of the edits but i got it working i had to keep some stuff there from the old program.
-Thanks
-Smart ass
Quote: "I meen Smart guy"