Jump to content
Search Community

Feature Request: Prop Updater

NateJC test
Moderator Tag

Recommended Posts

This plugin suggestion is kind of like the throwprops plugin and the dynamicprops plugin combined. Sort of. Maybe it's a feature of one of those plugins, or maybe it's a new plugin altogether..?

 

Basically, it would be nice to have a plugin that would allow you to manipulate a property of an object by a given numerical rate, with a specified "goal" for the property to reach, but without having to specify the duration and while still allowing this same property to be manipulated by external forces while the tween is in progress.

 

For example, let's say you wanted to tween a ball from the left side of the screen to a target on the right at a rate of 20 px/second. But, there are external forces that may temporarily pull it back to the left (such as a magnet passing by, a fan blowing against the ball, someone head-butting the ball a bit back in the other direction, etc). In-spite of these things that could alter the current x position and the overall dynamic duration of the tween, the engine will cause the ball to continue to traverse stubbornly toward the destination x value until it eventually (if ever), reaches it.

 

Upon arriving (or passing) the goal value for the property, an optional complete function may be called. Additionally, a tween definition variable could be set that will specify whether the object is permitted to rest at the overshot goal value or if it would be restricted to the goal value as a limit.

 

This type of tween plugin could have many other uses such as creating interesting AI, supporting the illusion of a level pan by temporarily adjusting the speed of tweened objects, giving abilities to the player to "slow" or "speed up" tweens with special character abilities, etc. Heck, you could build entire games based on this type of tween.

 

Anyway, let me know your thoughts... Thanks for such a great engine!

Link to comment
Share on other sites

It sounds almost like you're talking about a physics engine of sorts. That's an entirely different beast compared to a tweening engine. The thing about a tweening engine is that all tweens MUST have a duration of some kind - that whole concept is absolutely critical for being able to sequence things, build timelines, reverse animations, etc. See what I mean?

 

But if I understand your objective correctly, you could probably accomplish a good portion of that kind of effect with the existing tweening engine as it stands - you'd just need to recreate your tween(s) each time the target has some external interference. Like if the ball moves left-to-right across the stage and then it gets hit with something that moves it back 100 pixels, you'd just do a new tween at that point which would overwrite the old one. You'd need to calculate the duration based on whatever factors you want, like velocity, gravity, etc.

 

If you want advanced physics-based behaviors with various forces interacting, that's not something you should use any tweening engine for - look at physics engines instead. Otherwise it would be kinda like using a circular saw to hammer nails :) Although you're not alone in assuming those effects might be ones that TweenMax would be good at. And I really wish it were easy to make that sort of thing work, but unfortunately the paradigms and functional requirements are very different.

 

Keep the suggestions coming please.

Link to comment
Share on other sites

One thing I tested very briefly was using TweenLite to tween items to the current position of an invisibly physics object. I used APE for my test. I simply tested the amount the physics engine moved, if it was more than n I tweened to that new location. The reason was the physics engine drew things poorly, so it stuttered. TweenLite made it look good again.

 

But it was only a test, I doubt I'd use it for anything serious.

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...