Hello Everyone.
I am new to LiveCode and Animation engine. So I am finding it bit difficult to find right command.
Right now what I want to achieve is that when I rotate a Polygon, it should not rotate instantly. I want the polygon to rotate in 1 or 2 second.
I am using revRotatePoly but with this command the Polygon rotates instantly. What to do if I want to rotate it not instantly but with few seconds. Is their any command in animation engine that can help me.
Surbhit
Rotate Polygon in 1 seconds
Moderators: heatherlaine, kevinmiller, robinmiller, malte
Re: Rotate Polygon in 1 seconds
Code: Select all
on mouseUp
send "timedRotate" to me in 2 seconds
end mouseUp
on timedRotate
# do your revRotatePolygon stuff here
end timedRotate
Re: Rotate Polygon in 1 seconds
Thnx Shaosean,
That worked well. But I guess it was not right thing to do for what I want to achieve.
Actually I want to drag an object in a circular path, so I used constrainCircularCallBAck. But when rotating the object in a circular path does not rotate object. I want to rotate the object as the object moves around an arbitrary point. So that it gets a good look.
Hope you can help me with that.
Surbhit
That worked well. But I guess it was not right thing to do for what I want to achieve.
Actually I want to drag an object in a circular path, so I used constrainCircularCallBAck. But when rotating the object in a circular path does not rotate object. I want to rotate the object as the object moves around an arbitrary point. So that it gets a good look.
Hope you can help me with that.
Surbhit
Re: Rotate Polygon in 1 seconds
The findangle functions are your friend...
Cheers,
Malte
Cheers,
Malte
Re: Rotate Polygon in 1 seconds
Thnx Malte,
Will try that.
Will try that.