anicg Posted March 29, 2020 Share Posted March 29, 2020 How to get the switch node to choose randomly from its inputs every frame? Quote Link to comment Share on other sites More sharing options...
Atom Posted March 29, 2020 Share Posted March 29, 2020 Use the fit function like this... This will give you a random switch between 0-3. Notice the -1 count on the maximum number. Set the maximum fit number to the number of inputs. fit01(rand($F),0,4) 3 Quote Link to comment Share on other sites More sharing options...
Neronie Posted April 11, 2020 Share Posted April 11, 2020 Just to add to what Atom said, you can use the opninputs() expression to return the number of inputs currently connected to the switch node, like so: fit01(rand($F),0,opninputs(".")-1) 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.