Jump to content
Search Community

Real fish by greensock plugin need some guide

Asteroids test
Moderator Tag

Recommended Posts

I can only assume that you want to figure out a way to create motion like a fish swimming. 

I would suggest looking at the BezierPlugin which allows you to animate along the curves.

I imagine you could get something nice with very little fluctuations along the y axis.

 

Start by using something like this:

 

import com.greensock.*; 
import com.greensock.easing.*;
 
TweenMax.to(mc, 5.5, {bezier:{curviness:2.1, values:[{x:112, y:118}, {x:176, y:135}, {x:237, y:120}, {x:292, y:137}, {x:347, y:123}]}, ease:Sine.easeInOut});

 

or the sample code from the docs:

http://api.greensock.com/as/com/greensock/plugins/BezierPlugin.html

 

also check out the plugin explorer here to generate your own values:

http://www.greensock.com/v12/

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...