The boat does turn when you press left/right
I don't get what you mean by the camera following the boat - in my first change the camera stuck right behind the boat which you said was wrong and you said to look at your first piece of code. I did this and noticed that the camera stayed in exactly the same place and so replicated this in my code.
The only other thing I can think you might mean is you want the camera to point at the boat - if this is the case then try this:
rem **************************************************
rem * Boat3.dba *
rem * Code written by Matthew Silva *
rem * All Graphics, sounds from darkbasic cd *
rem **************************************************
GoSub SetupGame
GoSub LoadObjects
Do
GoSub PlayerControls
GoSub CorrectPlayerPosition
GoSub ScrollSea
GoSub LookAtPlayer
Sync
loop
SetupGame:
Sync On
Sync Rate 40
Hide Mouse
Rem Windowed Mode
Set Window Title "boat 2"
Set Window On
Return
LoadObjects:
Load Music "Hidden Fury.mid",1
Load Sound "jet.wav",1
Loop Music 1
Load Object "boat.x",1
Load Image "water.bmp", 1
Load Image "sky.bmp", 2
Make Object Sphere 2, 2000
Scale Object 2, -100, 100, 100
Texture Object 2, 2
Scale Object Texture 2, 2, 2
Set Object 2, 1, 1, 1, 1, 0
Backdrop Off
Make Object Plain 4, 500, 500
Rotate Object 4, 90, 0, 0
Texture Object 4,1
Make Object Plain 5, 500, 500
Rotate Object 5, 90, 0, 0
Texture Object 5,1
Ghost Object On 5
Position Object 4,0,-1,0
Position Camera 0, 20, -250
Point Camera 0,0,0
Return
PlayerControls:
Rem Deal with object being 90 degrees to camera (If the model
Rem you used isn't at 90 degrees to the camera delete this next
Rem line and its partner)
Turn Object Right 1, 90
If UpKey()
Move Object 1,-2
Play Sound 1
EndIf
If DownKey()
Move Object 1,2
Play Sound 1
EndIf
If LeftKey()
Turn Object Left 1, 5
EndIf
If RightKey()
Turn Object Right 1, 5
EndIf
Rem Deal with object being 90 degrees to camera
Turn Object Left 1, 90
Return
CorrectPlayerPosition:
If Object Position X(1) > 250
Position Object 1, 250, Object Position Y(1), Object Position Z(1)
EndIf
If Object Position X(1) < -250
Position Object 1, -250, Object Position Y(1), Object Position Z(1)
EndIf
If Object Position Z(1) > 250
Position Object 1, Object Position X(1), Object Position Y(1), 250
EndIf
If Object Position Z(1) < -250
Position Object 1, Object Position X(1), Object Position Y(1), -250
EndIf
ScrollSea:
Rem Gives the effect of ripples on the water
Scroll Object Texture 4, -0.0002, 0.0002
Scroll Object Texture 5, 0.0002, 0.0002
Return
LookAtPlayer:
Point Camera Object Position X(1), Object Position Y(1), Object Position Z(1)
Return
If that doesn't do what you want then tell me what it is doing that you don't like and what it isn't doing and try to be more descriptive.
We rode on the winds of the rising storm, we ran to the sounds of the thunder.
We danced among the ligtning bolts, and tore the world asunder.