TGC Codebase Backup



model viwer by MKII

11th Jul 2004 17:09
Summary

view .x models with key control and mouse look



Description

direct x model viwer uses mouse look and key control



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                      a:

hide mouse
input "enter the path and name of the model to view ''xxx.x'>'";mo$
input "texture;s path for object''xxx.bmp''>";mt$
load object mo$,1
   
load image mt$,1
texture object 1,1
print "use up and down keys to move"
do
if upkey()=1 then move camera 5
if downkey()=1 then move camera -5

cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
cz#=wrapvalue(cz#+mousemovez())
rotate camera cx#,cy#,cz#

rem update camera
loop object 1

loop