I'm trying to create a view like you are a driver in a car.
Where at the top of the screen in a box there is a mirror (which is a view looking behind you) and the rest of the screen is the main view looking forward.
I have two problems
i) the mirror view is distorted and streched
ii) There seems to be three cameras outputting to the screen
also if I have an over view and a follow object view, how would you switch between cameras?
Rem Project: CameraTest
Rem Created: 03/10/2002 00:30:33
rem diffrent Camera views
rem by Robert Browne
rem Standard Setup Code for all examples
sync on : sync rate 0 : color backdrop rgb(100,0,200)
set text font "arial" : set text size 16
set text to bold : set text transparent
rem Prepare Force Feedback (if available)
desc2$="Force feedback not available"
ForcePresent=0
empty checklist
PERFORM CHECKLIST FOR CONTROL DEVICES
for c=1 to checklist quantity()
if checklist value a(c)=1
SET CONTROL DEVICE checklist string$(c)
ForcePresent=1
desc2$="Force feedback available"
endif
next c
adv=0
back=0
go=0
Xjoy=0
rem Loading Prompt
sync : center text screen width()/2,screen height()/2,"LOADING" : sync
rem default view
rem set current camera 0
set camera range 1,7000
rem follow object
make camera 1
rem mirror for driver
make camera 2
set camera view 2,20,16,640-16,150-48
set camera fov 2, 70
position camera 2, 100,100,100
point camera 2, 0,0,0
position camera 0, 100,100,100
point camera 0, 0,0,0
rem position camera 2, 100,100,100
rem point camera 2,0,0,0
rem Create floating globe
make object sphere 4,25
MAKE OBJECT Box 1,25,50,100
position object 1, 0, 0, 0
color object 1,200
MAKE OBJECT Box 2,1000,1,1000
position object 2, 0, -26, 0
color object 2,20
rem main loop
do
rem Joypad code
Xjoy=joystick X()
go=joystick FIRE c()
back=joystick FIRE a()
reset=joystick fire d()
rem acceleration and decelleration of object
rem also if force feedback is available then use
if go=1
if adv 0 then adv=adv-2:if ForcePresent=1 then force shoot 25,200
endif
if adv > 99
if ForcePresent=1 then force shoot 100,100
endif
rem stop the object from unintentionally backward
if adv -500 then ang#=ang#+3: rotate object 1,0,ang#,0
if Xjoy 10 then SelCam = 0
rem Let camera track object
a#=object angle y(1)
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
set camera to follow 2,x#,y#,z#,a#,-1,70,1,0
set camera to follow 1,x#,y#,z#,a#,10,25,1,0
rem Update screen
sync
loop
L8R Dudes