| appendix |
| script bbClampSpeed |
Synopsis
int bbClampSpeed(string $particleNode)
ReturnValue
1 if operation successfuly, 0 else
Description
This command makes modifications to a particle node, so that particle velocity
can be min / max clamped.
Modifications in detail: Attributes Minimum Speed and Maximum Speed are added:
|
addAttr -sn mis -ln
bbMinimumSpeed -dv 0.0 -min 0.0 -max 100; |
Runtime expression is added to velocity in Per Particle (Array) Attributes
- it clamps the length of the velocity vector while maintaining its orientation.
|
$minS = particle.bbMinimumSpeed; if ($velLength >
$maxS) particle.velocity = $vel; |
Finally Expression after Dynamics is set to true, so the expression will have the desired effect.
Arguments
string $particleNode
- particle node wich is to be modified
Examples
Create particle node particleShape1, then enter :
bbClampSpeed particleShape1;
Notes
-/-