• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

expression to swap compositions based on path direction, orientation or rotation?

New Here ,
Jul 02, 2017 Jul 02, 2017

Copy link to clipboard

Copied

Say I have an object following a path, is there an expression to automatically swap to another composition or frames within a composition based on path direction?

So in the below image, the composition with the first line of sprites will be used when the character is moving downward.

When the character is moving left (or rotates 90 degrees) the expression swaps to the composition containing the second line of sprites etc.

Maybe this can be done with all the sprites in the one composition and the expression swaps to different frames within the one composition?

If you don't know the expression, any advice on where to look to find out more about this would be much appreciated.

download.png

Views

282

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2017 Jul 02, 2017

Copy link to clipboard

Copied

You cannot "swap" compositions. To create a sprite-sheet/ strip you have to have all elements in a pre-composition and use time-remapping or something like that. I'm just not sure why you would want to use convoluted expressions, especially since AE is not interactive and you still have to keyframe stuff. I mean figuring out the walk direction is not that difficult, but how would you determine in which direction he is looking? You still need some parameter for that. It's not like you would push a button on a gamepad. That being the case, you might just as well keyframe everything from the start. In fact then you'd don't even need any time-remapping and just cut your looping clips together while they are e.g. parented to a Null that you move around.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 31, 2017 Jul 31, 2017

Copy link to clipboard

Copied

Hi Russell,

Are you still facing this problem? If not, let us know how you solved it. If so, please let us know so we can assist you further.

Thanks,

Kevin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

LATEST

Yep, would have been good to find a solve. I'm faking a game board with an avatar with different animated cycles based on which way it is moving along a path. I can (and am) keyframing visibility of differnt comp cycles using transparency. Not hard, but woudl be nice for client iterations to just have her animation swap as we redesign and redesign the animation path.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines