Well I got somthing a little smoother working.
Setting the animframes is like a gessing game with this.
Any Improvments would be great.
Changes.....
( in while loop )
and in AnimTex Function()
Any Better Ideas Are welcome.
Setting the animframes is like a gessing game with this.
Any Improvments would be great.
Changes.....
( in while loop )
While Not KeyHit(1) Cls Repeat elapsed=MilliSecs()-time Until elapsed ticks=elapsed/period tween#=Float(elapsed Mod period)/Float(period) For k=1 To ticks time=time+period If k=ticks Then CaptureWorld Update( ) ; Changed this to ; atx=time/50 Mod 3 If Not atx AnimTex( ) UpdateWorld : tf#=tf#+1 Next RenderWorld tween#
and in AnimTex Function()
;Animate Texture UVs........\\\ Function AnimTex( ) af#=af#+1 For seq=0 To 1 For vi=0 To 1 sf=atxarr(seq,vi,0) ;Start Frame ef=atxarr(seq,vi,1) ;End Frame cf=atxarr(seq,vi,2) ;Current Frame c=atxarr(seq,vi,3) ;Veretex cf=cf+1 If cf>ef cf=sf End If U0#=UVarr(cf-1,0) V0#=UVarr(cf-1,1) U1#=U0#+.25 V1#=V0#+.25 S=GetSurface( Cube,1 ) VertexTexCoords(s,c+0,U1,V0 ) VertexTexCoords(s,c+1,U1,V1 ) VertexTexCoords(s,c+2,U0,V1 ) VertexTexCoords(s,c+3,U0,V0 ) atxarr(seq,vi,2)=cf Next Next End Function
Any Better Ideas Are welcome.