Okay for start ive been away from programing for about a year
How would i measure the distance from the camera to the object as im making a flight game (space) and have the movement figured but i would like it to check if the camera is a curtain distance away from the cube if so it goes towards it.
here is my movement code atm:
Rem Project: STAR
Rem Created: 07/07/2009 17:47:57
Rem ***** Main Source File *****
REM pre game
make matrix 1,100,100,100,100
make object cube 1,100
REM vars
speed# = 10
nspeed# = -10
ox# = OBJECT POSITION X(1)
oy# = OBJECT POSITION y(1)
oz# = OBJECT POSITION z(1)
do
Rem W
If Keystate(17)=1
MOVE OBJECT 1,speed#
endif
rem S
If Keystate(31)=1
MOVE OBJECT 1, nspeed#
endif
rem D
If Keystate(32)=1
TURN OBJECT right 1, speed#
endif
Rem A
If Keystate(30)=1
TURN OBJECT LEFT 1, speed#
endif
If Keystate(16)=1
move object down 1,speed#
endif
If Keystate(18)=1
move object up 1,speed#
endif
POINT CAMERA ox#, oy#, oz#
loop
[[[[wobble]]]] {{{{wobble}}}}