Quote: "this is my sphere and still it goes off into la la land. "
Lol. Have a look at the SET OBJECT TO CAMERA ORIENTATION command. Here's an example:
rem ********************************
rem LOOK AND SHOOT *
rem ********************************
rem Setup Game
sync on
sync rate 60
autocam off
rem Set the bullet's object number to 2.
rem This way I can easily change the bullet's object number.
Bullet=1
rem Create our bullet as object 2.
Make object sphere Bullet,5
rem Create a grid to get a sense of direction.
make matrix 1,1000,1000,10,10
rem Set the life of our bullet to 0. When the life is over 0 then the bullet is visible and does damage.
BulletLife=0
rem Set the 'bullet is alive' flag to 0.
BulletAlive=0
rem position the camera
position camera 0,50,0
do
rem Rotate the camera based on the mouse
rotate camera Camera angle x()+Mousemovey()/8,Camera angle y()+Mousemovex()/8,0
rem restrict the camera's rotation.
if camera angle x()>80 and camera angle x()<90 then xrotate camera 80
if camera angle x()>260 and camera angle X()<270 then xrotate camera 260
rem Shoot using the mouse. Only shoot if the bullet is done firing, however.
if mouseclick()=1 and BulletLife<=0
rem Set the life of the bullet to 100
BulletLife=100
rem Rotate the bullet to the camera's angle.
Set Object To Camera Orientation Bullet
rem Put the bullet where the camera is.
position object Bullet,camera position x(),camera position y(),camera position z()
endif
rem Decrease the life of our bullet
BulletLife=BulletLife-1
rem If the bullet is alive...
if BulelletLife>0
rem First, show the bullet.
show object Bullet
rem Now, Make a variable saying that it is alive.
BulletAlive=1
rem Otherwise... if the bullet isn't alive...
endif
rem If the bullet isn't alive...
if BulletLife<=0
rem Hide the bullet
hide object Bullet
rem The bullet is dead
BulletAlive=0
endif
rem Constantly move the bullet if it's alive.
If BulletAlive=1 then move object Bullet,5
rem Refresh Screen
sync
loop