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

move position every frame

Community Beginner ,
Apr 10, 2024 Apr 10, 2024

I'm looking for a script that will move position for a set amount per frame. For example, I'd like to move the y position by 45 units every frame...

TOPICS
Expressions
389
Translate
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 ,
Apr 10, 2024 Apr 10, 2024
Translate
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 ,
Apr 11, 2024 Apr 11, 2024

I think I misspoke. I'm not seeing how this script would do what I need. I'm actually looking for an expression that will move the position a set amount of pixels every frame. For example add 45 pixels to the position on every frame. So, if frame 1=0, frame 2=45, frame 3=90, frame 4=135 and so on. Hopefully a way to do this without keyframes?

Translate
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 Expert ,
Apr 11, 2024 Apr 11, 2024
LATEST

Maybe a position expression like this:

y = timeToFrames(time)*45;
[value[0],y]

or like this to start at the layer's original position:

yOffset = timeToFrames(time)*45;
value + [0,yOffset]

 

Translate
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