hi all. could someone please modify this so i can have a variable that tells it whether or not i see the bezier flight path of the camera?
if i can make an object follow the spline, then this problem will be solved
#constant SPLINE_MAX 50
#constant SPLINE_DIST 1500
sync on
color backdrop 0
make object triangle 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
color object 1, 255
set object wireframe 1, 1
make mesh from object 1, 1
SetSplineVectors(SPLINE_MAX, SPLINE_DIST)
make matrix 1000,1000,1000,20,20
do
if hitimer() > time and step# < 1.000
for vector = 1 to 5 * SPLINE_MAX step 5
SplineDraw(vector, step#)
next vector
step# = step# + 0.01
time = hitimer() + 30
endif
set camera to follow 0, 0, 0, angle#, 500, sin(angle#) * 100, 1.0, 0
point camera 0, 0, 0
angle# = angle# + 0.5
set cursor 0,0
print screen fps()
sync
loop
function SetSplineVectors(s, d)
for v = 1 to 5 * s step 5
for c = 0 to 4 : null = make vector3(v + c) : next c
set vector3 v, 0, 0, 0
set vector3 v + 1, 0, 0, 0
set vector3 v + 2, newxvalue(0, rnd(359), rnd(d)), newyvalue(0, rnd(359), rnd(d)), newzvalue(0, rnd(359), rnd(d))
set vector3 v + 3, newxvalue(0, rnd(359), rnd(d)), newyvalue(0, rnd(359), rnd(d)), newzvalue(0, rnd(359), rnd(d))
set vector3 v + 4, newxvalue(0, rnd(359), d), newyvalue(0, rnd(359), d), newzvalue(0, rnd(359), d)
next v
endfunction
function SplineDraw(v, s#)
x1# = x vector3(v)
y1# = y vector3(v)
z1# = z vector3(v)
hermite vector3 v, v + 1, v + 2, v + 3, v + 4, s#
x2# = x vector3(v)
y2# = y vector3(v)
z2# = z vector3(v)
lock vertexdata for limb 1, 0
c = get vertexdata vertex count()
set vertexdata position c - 3, x1#, y1#, z1#
set vertexdata position c - 2, x2#, y2#, z2#
set vertexdata position c - 1, x2#, y2#, z2#
add mesh to vertexdata 1
unlock vertexdata
endfunction
CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!