Page 1 of 1

Rotate Polygon in 1 seconds

Posted: Fri Aug 31, 2012 9:26 am
by Surbhit29
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

Re: Rotate Polygon in 1 seconds

Posted: Fri Aug 31, 2012 10:56 am
by shaosean

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

Posted: Fri Aug 31, 2012 11:25 am
by Surbhit29
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

Re: Rotate Polygon in 1 seconds

Posted: Fri Aug 31, 2012 2:42 pm
by malte
The findangle functions are your friend...

Cheers,

Malte

Re: Rotate Polygon in 1 seconds

Posted: Sat Sep 01, 2012 8:25 am
by Surbhit29
Thnx Malte,
Will try that.