Dave211 Posted November 12, 2013 Share Posted November 12, 2013 Is there any way to have the starting y of a line or rectangle follow a circlePath while the ending y of the line remains locked? In other words, creating a pivot like action such as a engine piston or locomotive wheel piston. I tried rotating the line with additional TweenMax.To, but it does not create exact results. Link to comment Share on other sites More sharing options...
Carl Posted November 13, 2013 Share Posted November 13, 2013 I would suggest tracking the position of an object that moving in a circular fashion and then just use the drawing API to draw a line from the position of the object that is rotating to a fixed point. Here is a tutorial (see the first example) http://www.devx.com/webdev/Article/29882 that shows how to connect two moving objects with a line. In your case it seems one point won't be moving. Link to comment Share on other sites More sharing options...
Dave211 Posted November 13, 2013 Author Share Posted November 13, 2013 I would suggest tracking the position of an object that moving in a circular fashion and then just use the drawing API to draw a line from the position of the object that is rotating to a fixed point. Here is a tutorial (see the first example) http://www.devx.com/webdev/Article/29882 that shows how to connect two moving objects with a line. In your case it seems one point won't be moving. Carl, Thanks for the reply. I'll view the tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now