Skip to content

PercentageEnabledBoolMaterialDriver

14.15

Inheritance 4 ancestors · 50 siblings

Class Documentation

Edit documentation

A bool driver that passes BoolDriver through only by chance. Each time the input turns true, the driver rolls once: with probability Percentage the output is true for as long as the input stays true, otherwise it stays false for that time.

The driver keeps one state per source, so each unit rolls on its own. While the input is false the output is false, and the next change to true rolls again.

Properties

Percentage

F32 = 0.5
Edit documentation

The probability that the output follows the input, as a fraction from 0 to 1. 0.5 is a one-in-two chance; 1 or more always passes, and 0 or less never does.