Hi there
@Pincho Paxton
I nearly got it working...it needs more adjustments...I just change a positive value to negative. We still have something wrong with curves but close to the floor looks better.
yrotate object counter2,wrapvalue(object angle y(399+n) -90)
set display mode 1024,768,32
`set gamma 200,200,200
set normalization on
Dim path(170,7,2)
sync on
sync rate 0
`hide mouse
autocam off
Gosub makepaths
Do
Gosub positionCamera
sync
loop
makepaths:
Load array "Data/paths.data", path()
counter2 = 400
for n1 = 1 to 1
for n = 1 to 170
make object cube counter2,0.3
position object counter2,path(n,n1,1),-16,path(n,n1,2)
inc counter2
next n
next n1
for n = 1 to 169
point object 399 + n,path(n+1,1,1),-16,path(n+1,1,2)
`fix object pivot 399 + n
next n
for n1 = 2 to 7
for n = 1 to 170
make object cube counter2,0.3
position object counter2,path(n,n1-1,1),-16,path(n,n1-1,2)
set object to object orientation counter2,399 + n
`fix object pivot counter2
yrotate object counter2,wrapvalue(object angle y(399+n) -90)
move object counter2,1
path(n,n1,1) = object position x(counter2)
path(n,n1,2) = object position z(counter2)
inc counter2
next n
next n1
`save array "Data/Paths.data",path()
Return
positionCamera:
control camera using arrowkeys 0,(0.1/screen fps())*((200-fov)/2),0.1*((200-fov)/2)
smoothcamx# = ( smoothcamx# + mousemovey() )
smoothcamy# = ( smoothcamy# + mousemovex() )
xrotate camera ( camera angle x() + ( smoothcamx# - camera angle x() ) / 90.0 )
yrotate camera ( camera angle y() + ( smoothcamy#/8.0 - camera angle y() ) / 90.0 )
Return
RE-EDITED
While watching carefully your code, I noticed that the problem starts at the first line of waypoints, where you place the first path...it looks like you made the road with small bends even on the straights, as some of the waypoint of this first line, point as I commented .
Cheers.
I'm not a grumpy grandpa
