|
|
Le 13/10/2011 16:52, D103 nous fit lire :
> Hello,
> I am making a very basic test animation of a cannon shell being fired from a
> gun.
> After a bit of fiddling around, I have sorted out the path of the shell, and can
> do pretty much anything I want with it.
>
> However I have not figured out how to rotate it so that it is always tangent to
> it's path.
>
> I have written another "still" scene where the path is defined by a spline, but
> the
> closest I could get to a tangent was this:
what about creating the cylinder at the right position & orientation
first ? (instead of creating it and moving it)
tangent to spline Path1 at P is something like looking at P+epsilon.
#local CurPoint=Path1(P);
#local Soon=Path1(P+epsilon);
cylinder { CurPoint+50*vnormalize(Soon-CurPoint),
CurPoint+50*vnormalize(CurPoint-Soon), 1
...
(assuming you want the center of cylinder on spline)
Post a reply to this message
|
|