|
|
Given a defined object "shippy" and a reorient or Oritransform vector, I
came up with this simple method for movement of a vehicle. All of the
tinkering is done with the Acceleration spline. It may be more realistic
than movement *along* a spline, but TJMHO. The nice thing is you can tinker
with Final_Frame << TotalFrames and still see exactly where the ship is
going to end up...
#declare TotalFrames=150;
#declare Pee=<0,-200,0>;
#declare Acc= //accelerator
spline {
linear_spline
0.00,<.3,0,-0>
0.25,<0,9,-.1>
0.25,<0,0,-.1>
0.30,<0,-0.0,-.1>
1.0, <.5,-4,-38.5>
}
#declare Vee=<0,0,0>;
#declare n=0;
#while(n<TotalFrames+1)
#declare Vee=Vee+(0.1*Acc(n/TotalFrames));
#declare Pee=Pee+0.1*Vee;
#if (int(clock*150)=n)
object{shippy Oritransform(x+0.0001*y,<Vee.x,0,Vee.z>) translate
400*z+Pee rotate 0*y }//translate -300*clock*z}
#end
#declare n=n+1;
#end
Post a reply to this message
Attachments:
Download 'drive04c.mpg' (380 KB)
|
|