Rotate Polygon in 1 seconds

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
Surbhit29
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Rotate Polygon in 1 seconds

Post by Surbhit29 » Fri Aug 31, 2012 9:26 am

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

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Rotate Polygon in 1 seconds

Post by shaosean » Fri Aug 31, 2012 10:56 am

Code: Select all

on mouseUp
  send "timedRotate" to me in 2 seconds
end mouseUp

on timedRotate
  # do your revRotatePolygon stuff here
end timedRotate

Surbhit29
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Re: Rotate Polygon in 1 seconds

Post by Surbhit29 » Fri Aug 31, 2012 11:25 am

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

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Rotate Polygon in 1 seconds

Post by malte » Fri Aug 31, 2012 2:42 pm

The findangle functions are your friend...

Cheers,

Malte

Surbhit29
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Re: Rotate Polygon in 1 seconds

Post by Surbhit29 » Sat Sep 01, 2012 8:25 am

Thnx Malte,
Will try that.

Post Reply

Return to “Animation Engine”