tween for setanimtime?

Blitz3D Forums/Blitz3D Programming/tween for setanimtime?

(tu) sinu(Posted 2003) [#1]
is it possible somehow to tween from one animation to another using the setanimtime function, it just seems to jump to a new animation unlike 'animate' which allows a tween value?

maybe it should be a feature request.


Ricky Smith(Posted 2003) [#2]
The 'tween' value you refer to with the 'animate' command is the transition value between different animation sequences. This allows smooth transition from one sequence to another.
The 'SetAnimTime' command sets the animation to a specific frame within a sequence - by default it is sequence 0.The 'time#' parameter is a float so you can set the animation time 'between' frames.
When you use SetAnimTime it moves immediately to the specified frame time so you will have to do any tweening manually.


(tu) sinu(Posted 2003) [#3]
animate also seems to do the same, goes from a frame to the next set on the speed specified and when you change animations it goes to that one but allows you to tween.

SetAnimTime is like a manual version of it with everything except tween for when you change animations.

"When you use SetAnimTime it moves immediately to the specified frame time so you will have to do any tweening manually. "

how do i do that?


Ricky Smith(Posted 2003) [#4]
You could use a Quaternion SLERP function to interpolate between the start and ending quaternion rotation values and another type of interpolaton function for the position keys - this could be linear or any other interpolation method that gives the desired effect.
Have a look at the Quaternion and Interpolation functions in the code archives.


(tu) sinu(Posted 2003) [#5]
thnx, i'll go see.