|
|
CdeathJd nous apporta ses lumieres en ce 01/08/2006 21:22:
> Also i tried the only other thing i could think of, making pov ray calculate
> through each frame, from the beginning adding the velocity if it was facing
> downwards, this didn't work, gave an error, and stopped letting me render
> untill i reloaded the program, no idea why, heres my attempt at it:
> camera {
> location 0
> look_at z
> translate <0,0.4,0.4>
> #declare clock1=0;
> #declare newy=0;
> #declare oldy=0;
> #declare velocity=1;
> #while (clock1<clock)
> #declare oldy=newy;
> Spline_Trans (MySpline, velocity+(clock*130), y, 0.5, 0.5)
> #declare newy=camera.y;
> #if (newy>oldy)
> velocity=velocity+0.5;
> #end
> #declare clock1=clock1+1;
> #end
> }
By default, the clock variable goes from 0 to 1. As clock1 increase by steps of
1 unit, the loop will always exit the first time trough, even on the very last
frame where clock will be equal to 1.
As a side note: variables are case sensitive: "A" is distinct from "a". It's
always preferable to use user variables starting with an upper case character.
That way, if the SDL gets later expanded, you can be sure that your variables
names won't conflict with any new reserved words.
--
Alain
-------------------------------------------------
A pat on the back is only a few centimeters from a kick in the butt.
Post a reply to this message
|
|