|
![](/i/fill.gif) |
CdeathJd nous apporta ses lumieres en ce 06/08/2006 15:25:
> Urs Holzer <urs### [at] andonyar com> wrote:
>> Just evaluate the spline at two times. Once where you are in time now
>> and once a second later. This gives you the position you have now and
>> the position you will have a second later. If you substract these two
>> values you will have the velocity. (The velocity is a vector pointing
>> in the direction you move. His length is your speed.)
>>
>
> This would be good to do, if its gone down, add some velocity, but im too
> used to basic and i cant do it in pov-ray, its two different languages, the
> only similarity is the maths.
>
> I have no idea how to grab the x,y,z value from the camera, or the spline. I
> failed here in basic aswell, but cant really explain why, and that wasnt
> using splines at all.
>
> I tried doing this in the camera statement:
> Spline_Trans (MySpline, clock-1, y, 0.85, 0.85)
> //translate <50, 42.5, -212>
> #declare ythen=y;
> Spline_Trans (MySpline, clock, y, 0.85, 0.85)
> #declare ynow=y;
>
> it didnt error, but the camera then went far to the left of the track, even
> if by chance, the "ythen" and "ynow" values worked, and the view didnt
> shift to the left, i still wouldn't know what to do next. Its a shame it
> doesnt work more like other programming languages! Then it would have been
> easier :S
>
>
>
You could alter your speed acording to your hight, usualy represented by the "y"
coordinate. You go faster when you are low, smaller y values, and slower when
high, larger y values.
--
Alain
-------------------------------------------------
Gossip is when you hear something you like about someone you don't.
Post a reply to this message
|
![](/i/fill.gif) |