Jump to content
Search Community

Search the Community

Showing results for tags 'PathFollower'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hi there, i'm about to switch to Starling Framework for my new projects. For a game i animated an object with autorotate=true like this so far (simplified): points = [new Point(50, 35), new Point(500, 35), new Point(500, 300)]; path = new LinePath2D(points); var f:PathFollower = path.addFollower(object, 0, true, 90); tween = TweenMax.to(f, time, {progress: 1, onUpdate:onUpdateTween, ease:Linear.easeNone}); The object started with an initial rotation of 90° to the right and after reaching the 2nd point it was rotated again by 90° for reaching the final point. Now with Starling the same approach doesn't work anymore, since there rotations are calculated using radians. Therefore the rotation at point 2 will not look correctly anymore: points = [new Point(50, 35), new Point(500, 35), new Point(500, 300)]; path = new LinePath2D(points); var f:PathFollower = path.addFollower(object, 0, true, deg2rad(90)); // this allows the initial rotation tween = TweenMax.to(f, time, {progress: 1, onUpdate:onUpdateTween, ease:Linear.easeNone}); Is there a way how rotation can be handled correctly for a Starling Image/Sprite object with Greensock ? Btw. how can a LinePath2D object be added to a Starling Sprite ? At the moment i get the error "Implicit coercion of a value of type com.greensock.motionPaths:LinePath2D to an unrelated type starling.display:DisplayObject." Thank you for your help. Bests valley
×
×
  • Create New...