Hello..Hope everyone safe in these trying times
I am kind of stuck with this animation issue. I have an arrow representing wind as fontawesome in a label. The arrow changes direction as per a user choice as follows:
It rotates fine. Now, I want to animate it so that it moves in same changed direction certain distance and then back to repeat the animation, to give the wind direction FROM feel.
I tried using Animation library as follows:
But, the direction of movement is not correct in few directions. Please help.
Rgds..
I am kind of stuck with this animation issue. I have an arrow representing wind as fontawesome in a label. The arrow changes direction as per a user choice as follows:
B4X:
setRotation(label,spn.SelectedItem)
B4X:
Sub setRotation(v As View, Angle As Float)
Dim jo = v As JavaObject
jo.RunMethod("setRotation", Array As Object(Angle))
End Sub
I tried using Animation library as follows:
B4X:
anim.InitializeTranslate("",0,0,(40*Cos(spn.SelectedItem)),(40*Sin(spn.SelectedItem)))
anim.Duration=1000
anim.Repeatcount=-1
anim.Start(label)
Rgds..