Rotate Polygon in 1 seconds

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

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Rotate Polygon in 1 seconds

Postby 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
Surbhit29
 
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Re: Rotate Polygon in 1 seconds

Postby 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
shaosean
 
Posts: 797
Joined: Thu Nov 04, 2010 7:53 am

Re: Rotate Polygon in 1 seconds

Postby 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
Surbhit29
 
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm

Re: Rotate Polygon in 1 seconds

Postby malte » Fri Aug 31, 2012 2:42 pm

The findangle functions are your friend...

Cheers,

Malte
malte
 
Posts: 1096
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany

Re: Rotate Polygon in 1 seconds

Postby Surbhit29 » Sat Sep 01, 2012 8:25 am

Thnx Malte,
Will try that.
Surbhit29
 
Posts: 80
Joined: Thu Aug 16, 2012 1:25 pm


Return to Animation Engine

Who is online

Users browsing this forum: No registered users and 2 guests