Basic Animation: How to move objects dynamically.

Software: Away3D 3.x

Hector, Sr. Member
Posted: 02 August 2016 03:09 PM   Total Posts: 137

We have an old Away3D v3.6 app where the user can add some 3D objects to the scene. We would like to make these object’s positions to be animated. In order to do this, the user can use several keyframes (or time lapses, I don’t know the right term).

Basically the user can specify:
- The duration in seconds between keyframe and keyframe.
- The start and end position of each object.
- The range of the time lapse (from keyframe to keyframe), where each object will start and stop moving.

A very simple script would be like this:
- Keyframe1 to Keyframe2 duration: 10s.
  - ObjectA: Move from keyframe1 to keyframe2 in a certain direction (start to end pos). Start moving at 3s and stop moving at 7s.
  - ObjectB: Move from keyframe1 to keyframe2 in a certain direction (start to end pos). Start moving at 0s and stop moving at 5s.

When user press play, objects will move from start to end pos in the specified time.

Sorry I can’t explain it better. My first though is to use the PathAnimator class or some 3rd party tweener, but not sure how or what is the best way.

Any advice on this or any example I can look at? Thanks in advance.

   

Avatar
Fabrice Closier, Administrator
Posted: 02 August 2016 05:05 PM   Total Posts: 1265   [ # 1 ]

You could use PathAnimator, if you go from A to Z using a complex curve or series of curves. If you only go in straight lines, any tween engine/interpolation will do.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X