hey, this is the same code, but ive added to it, so i guessed i should post here too. well ive changed the cube to a cone so i can see what direction its facing, but unless its just my comp, the cone seems to be disappearing..
help please?
Make Matrix 1,500,500,50,50
sync on: sync rate 60
make object cone 1,20
xrotate object 1,90
fix object pivot 1
do
sync
gosub Getinput
gosub Movementandcamera
loop
getinput:
if upkey()=1 then up=1 else up=0
if rightkey()=1 then right=1 else right=0
if leftkey()=1 then left=1 else left=0
if inkey$()="a" then a=1 else a=0
if inkey$()="d" then d=1 else d=0
return
movementandcamera:
if right=1 then yrotate object 1,wrapvalue(object angle y(1)+1)
if left=1 then yrotate object 1,wrapvalue(object angle y(1)-1)
if up=1 then move object 1,1
if a=1 then zrotate object 1,wrapvalue(object angle z(1)-1)
if d=1 then zrotate object 1,wrapvalue(object angle z(1)+1)
set camera to follow object position x(1), object position y(1), object position z(1),object angle y(1),100,20,1,1
return
Edit:
I removed the pivot code and it works fine, any ideas?
Omricon W.I.P