Timeline Support #23
Replies: 2 comments 3 replies
-
I can't think of many uses for this function apart from Timeline support, so I'd prefer not adding it to the plugin. I'd recommend you to create an extension function in your plugin and call it instead: public static void Evaluate( this BezierWalkerWithTime walker, float normalizedT, bool isForward )
{
float _normalizedT = walker.highQuality ? walker.spline.evenlySpacedPoints.GetNormalizedTAtPercentage( normalizedT ) : normalizedT;
//Position
walker.transform.position = walker.spline.GetPoint( _normalizedT );
//Rotation
if( walker.lookAt == LookAtMode.Forward )
{
BezierSpline.Segment segment = walker.spline.GetSegmentAt( _normalizedT );
Quaternion targetRotation;
if( isForward )
targetRotation = Quaternion.LookRotation( segment.GetTangent(), segment.GetNormal() );
else
targetRotation = Quaternion.LookRotation( -segment.GetTangent(), segment.GetNormal() );
walker.transform.rotation = targetRotation;
}
else if( walker.lookAt == LookAtMode.SplineExtraData )
walker.transform.rotation = walker.spline.GetExtraData( _normalizedT, walker.extraDataLerpAsQuaternionFunction );
} As for ParticlesFollowBezier, Relaxed mode probably won't work but Strict mode may work out of the box. You need to first somehow evaluate the ParticleSystem itself at that time, then evaluate the ParticlesFollowBezier script. |
Beta Was this translation helpful? Give feedback.
-
Cool! I have update the Plugin, and it might help others to create TimelinePath Animation! Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Hi! I have been looking for Timeline WayPath at AssetStore for ages, but none of them reach our goal, until I found this solution, it's wonderful!
It is widely known that developing with timeline-clip is pain in the ass, and it might take you lots of time, I know it's not fair to waste your time for these feature.
Actually I had made my own Timeline plugin EventPlayer which will send clip data (e.g. Time, Percent, Duration) and is easy to extend without unnecessary coding. So I wonder, can I add timeline support for your plugin?
I have test the following code and it works fine, is it ok for you to add the following method(or similar) for BezierWalker/ParticlesFollowBezier so I can invoke it manually? (Or If you are not going to change the interface in the up coming release, I can write these thing in my plugin (^_^).
Beta Was this translation helpful? Give feedback.
All reactions