
-----------------------------------
jonos
Mon Mar 08, 2004 11:23 pm

[Aplication][Blitz] Model Viewer
-----------------------------------
its fixed now!!!

If you are like me and you are just sick of using the 3D Max way of viewing your models or whatever modeler you use, you just want something easy that you can cruise around your model with, with controls similiar to fps. welll i made this because its easy that way, and if you want it made into a .exe then just tell a blitzer here and tehy wiill do it (including me).

this took me around 20 mins just cause im really tired and had to learn about  mousex, mousey and all that stuff.

edit: oops i posted the wrong program...i can't find the one where you type the path and everything so you'll just have to modify the code in the appropriate place in order the get model and the texture. just use a bmp for a texture, im not sure about other picture formats.


Graphics3D 800, 600

SetBuffer BackBuffer()

;camera
camera=CreateCamera()
PositionEntity camera, 0, 0, 0

;light
light=CreateLight()

model=LoadMesh ("person.3ds")
PositionEntity model, 0, 0, 10

;texture
;texture=LoadTexture("ballTexture.bmp")
;EntityTexture torus, texture

While Not KeyDown(1)
;movement
If KeyDown(201)=True Then y#=1
If KeyDown(209)=True Then y#=-1
If KeyDown(30)=True Then x#=-1
If KeyDown(32)=True Then x#=1
If KeyDown(17)=True Then z#=1
If KeyDown(31)=True Then z#=-1

MoveEntity camera, x, y, z

;rotating
RotateEntity camera, MouseY(), MouseX(), rz
If MouseX() >780 Then MoveMouse MouseX()-1, MouseY()
If MouseX() 580 Then MoveMouse MouseX(), MouseY()-1
If MouseY() 780 Then MoveMouse MouseX()-1, MouseY()
If MouseX() 580 Then MoveMouse MouseX(), MouseY()-1
If MouseY() 