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

Wiggle position in a certain angle

Guest
Dec 17, 2009 Dec 17, 2009

Hi

is there a way to wiggle a layer's position in a certain angle?i'd like my layer's position to wiggle in 45° degrees for example.

any ideas?

TOPICS
Expressions
1.4K
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 ,
Dec 17, 2009 Dec 17, 2009

This should work:

angle = 45;
w = wiggle(3,100) - value;
a = degreesToRadians(angle);
x = w[0]*Math.cos(a);
y = w[0]*Math.sin(a);
value + [x,y]

Dan

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
Guest
Dec 17, 2009 Dec 17, 2009
LATEST

thank you very much Dan,great code

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