Skip to main content
Participant
August 9, 2024
Question

Wiggle with restrictions

  • August 9, 2024
  • 1 reply
  • 136 views

I defined a basic wiggle code [wiggle (4,8)]  on the position of a 3d object (xyz). How do I determine that the y-axis will not pass a certain value that I set for it?

 

thanks

This topic has been closed for replies.

1 reply

Legend
August 9, 2024

Using Math.min() 

 

wgl = wiggle(4,8);
x = wgl[0];
y = Math.min(wgl[1], 540); // <=== put your max value here
z = wgl[2];

[x, y, z]