OvrRandom
Subclass of Ovr.OvrNode
Subclass of Ovr.OvrNode
This node is used to generate random values, based on the type of variable the user needs.
By changing the OvrVariableType, the requirements to get the random value change as well.
Attributes
Note: the following attributes are added to the existing ones from the super class OvrNode
Name | Type | Description |
---|---|---|
VariableType | Type of the variable | |
OvrRandomType | Type of function used to generate Random value (in case of Numbers, only Between is allowed) | |
Min | Min. value of the range | |
Max | Max. value of the range | |
Result | Resulting value | |
QuaternionResult | Resulting rotation value |
In order to generate a random number (OvrInt or OvrFloat), the user needs to provide the node with a maximum and minimum value. The result will be stored in a numeric variable.
There are several ways to generate a new OvrVector2 or OvrVector3:
Like for random numbers, between Min and Max Vectors;
Inside a Unity Circle [OvrVector2] or Sphere [OvrVector3], by calculating a random Vector inside a sphere with radius 1, then scaled up using Min and Max values.
On the surface of a Unit Sphere [OvrVector3 only], by calculating a random Vector on the surface of a sphere with radius 1, then scaled up using Min and Max values.
Attributes are very similar to those above.
To generate a new Rotation (OvrQuaternion), the user can either:
Generate a simple random Rotation;
Generate a random Rotation with uniform distribution