diff --git a/sprite.go b/sprite.go index 62778cb..5a78648 100644 --- a/sprite.go +++ b/sprite.go @@ -648,8 +648,11 @@ func (p *Sprite) goAnimateInternal(name string, ani *aniConfig, isBlocking bool) fromvalf = frameFrom tovalf = frameTo } else { - fromvalf = fromval.(float64) - tovalf = toval.(float64) + if ani.AniType != aniTypeGlide { + // glide animation, the type of value is vector2, not float + fromvalf = fromval.(float64) + tovalf = toval.(float64) + } } if ani.AniType == aniTypeFrame {