Alright so i am working on my game, and it is a vehicle i am starting off with. The movement is ok, the camera is in the right position.
My problem is , the camera and model are facing forward, when i use my move object command, apparently the object is not orientated right.
ive tried different ways of rotating the object but it just rotates the orientation point too.
The object is 90 degrees rotated away from where its moving.
here is my code.
Rem ***** Included Source File *****
` Thursday, October 07, 2010
Rem ***** Main Source File *****
player=1
world=2
beaver$="models/beaverwheel.3ds"
map$="models/map.3ds"
text screen width()/2,screen height()/2,"Loading:" + beaver$
sync
load object beaver$,player
cls
sync
text screen width()/2,screen height()/2,"Loading:" + map$
load object map$,world
scale object world,30,30,30
set object smoothing 1,100
scale object 1,25,25,25
make matrix 2,100,100,10,10
`sensitivity best left between 1-10
sens# = 10
sensitivity# = sens#/10
accel#=0.0
maxaccel#=6.0
speed#=0.0
acceli=0
rotate object player,object angle x(player),180,object angle z(player)
do
sync rate 60
accel#=acceli/20
if upkey()=1
if accel# < maxaccel#
inc acceli,2
endif
endif
if downkey()=1
if accel# > 0
dec acceli,2
endif
endif
if upkey()=0
if downkey()=0
if accel#>0
dec acceli
endif:endif:endif
if leftkey()=1
yrotate object player,wrapvalue(object angle y(player)-sensitivity#)
else
ENDIF
if rightkey()=1
yrotate object player,wrapvalue(object angle y(player)+sensitivity#)
else
Endif
move object player,accel#
`Camera settings
rotate camera 0,0,0
position camera 0,object position x(1),object position y(1)+20,object position z(1)
rotate camera 0,object angle x(1),object angle y(1)+90,object angle z(1)
move camera 0,-30
sync
LOOP