Random From Distributions: Statistical Distributions Random Number Generator
Nathan Daly
$0.0
Date |
Price |
---|---|
日期和时间 |
价钱($) |
03/19(2018) |
0.0 |
11/16(2024) |
0.0 |
Jump AssetStore
Provides a series of functions to get a random number from various distributions. Unity's built-in Random.Range() provides random numbers from the Uniform Distribution, but this package gives the programmer more choices.
This package provides the ability to get a random number from:
- Normal Distribution
- Linear Distribution
- Exponential Distribution.
- Hockey Stick Curve Distribution (sec^2 distribution).
- Custom Discrete Probability Function.
For each distribution there are multiple options that describe the shape of the distribution the random numbers are pulled from.
The package adds a single script file, RandomFromDistribution, that contains all of these static functions.
It also contains example scenes that demonstrate these functions, allowing you to see how the different options affect each distribution.
Use these distributions to generate random objecst in a very large range, but clustered around the center (normal distribution). Or use it to specify spawning probabilities for different monsters based on their difficulties (custom discrete probability function). Or use it randomize a timer that is more likely to go off quickly but sometimes takes a while (linear, exponential, or hockey stick slope distributions). There are lots of possibilities to play with!