User Tools

Site Tools


dragengine:modules:dragonscript:behavior_attachable_randomizegeometry

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:behavior_attachable_randomizegeometry [2025/10/28 16:31] dragonlorddragengine:modules:dragonscript:behavior_attachable_randomizegeometry [2025/10/28 17:14] (current) – removed dragonlord
Line 1: Line 1:
-{{tag>dragonscript behavior}} 
-<WRAP youarehere> 
-[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[dragengine:modules:dragonscript:abstractions|Abstraction Layers: How you want to build your Game]] >> [[dragengine:modules:dragonscript:behavior_elements|Behavior Elements]] >> **ECABehaviorRandomizeGeometry** 
-</WRAP> 
- 
-  * [[behaviors_use_cases|Behaviors Explained: By Use-Case]] 
-  * [[behaviors_a_to_z|Behaviors Explained: From A to Z]] 
- 
-====== ECABehaviorRandomizeGeometry ====== 
- 
-Attachable element behavior randomizing geometry of element. 
- 
-Upon adding the behavior to an element the geometry of the element is randomized. After this point the behavior has no effect anymore and can be removed if desired. 
- 
-Main use for this behavior though is using attachable behavior factory by adding the behavior to an element in the world editor. Used this way the randomization is applied during factory create behavior call without actually adding the behavior to the element. This way the randomization is applied once during element instantiation without keeping the behavior around. Randomization uses element stub properties with prefix ''randomizeGeometry.''. Randomization is applied relative to the current element geometry. 
- 
-====== Element Class Properties ====== 
- 
-Element class properties have the prefix ''randomizeGeometry.''. 
- 
-===== position ===== 
- 
-Move element by a random amount from the range ''-position'' to ''position''. Movement is done in world space. 
- 
-  * Full name: ''randomizeGeometry.position'' 
-  * Type: 3-point float vector 
-  * Default value: ''(0, 0, 0)'' 
-  * Example (*.deeclass): <code xml><vector name='randomizeGeometry.position' x='0.2' y='0' z='0.2'/></code> 
- 
-===== positionMinimum ===== 
- 
-Move element by a random amount from the range ''-positionMinimum'' to ''positionMaximum''. If present ''randomizeGeometry.position'' is ignored. Movement is done in world space. 
- 
-  * Full name: ''randomizeGeometry.positionMinimum'' 
-  * Type: 3-point float vector 
-  * Default value: ''(0, 0, 0)'' 
-  * Example (*.deeclass): <code xml><vector name='randomizeGeometry.positionMinimum' x='-0.2' y='0' z='-0.2'/></code> 
- 
-===== positionMaximum ===== 
- 
-Move element by a random amount from the range ''-positionMinimum'' to ''positionMaximum''. If present ''randomizeGeometry.position'' is ignored. Movement is done in world space. 
- 
-  * Full name: ''randomizeGeometry.positionMaximum'' 
-  * Type: 3-point float vector 
-  * Default value: ''(0, 0, 0)'' 
-  * Example (*.deeclass): <code xml><vector name='randomizeGeometry.positionMaximum' x='0.2' y='0' z='0.2'/></code> 
- 
-===== rotation ===== 
- 
-Rotate element by a random amount in degrees from the range ''-rotation'' to ''rotation''. Rotation is done in world space. 
- 
-  * Full name: ''randomizeGeometry.rotation'' 
-  * Type: 3-point float vector 
-  * Default value: ''(0, 0, 0)'' 
-  * Example (*.deeclass): <code xml><vector name='randomizeGeometry.shift' x='0' y='20' z='0'/></code> 
- 
-===== rotationMinimum ===== 
- 
-Rotate element by a random amount in degrees from the range ''-rotationMinimum'' to ''rotationMaximum''. If present ''randomizeGeometry.rotation'' is ignored. Rotation is done in world space. 
- 
-  * Full name: ''randomizeGeometry.rotationMinimum'' 
-  * Type: 3-point float vector 
-  * Default value: ''(0, 0, 0)'' 
-  * Example (*.deeclass): <code xml><vector name='randomizeGeometry.rotationMinimum' x='' y='-20' z='0'/></code> 
- 
-===== rotationMaximum ===== 
- 
-Rotate element by a random amount in degrees from the range ''-rotationMinimum'' to ''rotationMaximum''. If present ''randomizeGeometry.rotation'' is ignored. Rotation is done in world space. 
- 
-  * Full name: ''randomizeGeometry.rotationMaximum'' 
-  * Type: 3-point float vector 
-  * Default value: ''(0, 0, 0)'' 
-  * Example (*.deeclass): <code xml><vector name='randomizeGeometry.rotationMaximum' x='0' y='20' z='0'/></code> 
- 
-===== scale ===== 
- 
-Uniformly scale element by a random amount from the range ''1 - scale'' to ''1 + scale''. The value is thus the percentage to increase/decrease the scaling. For example a value of ''0.1'' increases/decreases the scaling of the element by up to 10%. Scaling is done in element space. 
- 
-  * Full name: ''randomizeGeometry.scale'' 
-  * Type: float 
-  * Default value: ''0'' 
-  * Example (*.deeclass): <code xml><float name='randomizeGeometry.scale'>0.1</float></code> 
- 
-===== scaleMinimum ===== 
- 
-Uniformly scale element by a random amount from the range ''1 + scaleMinimum'' to ''1 + scaleMaximum''. The value is thus the percentage to increase/decrease the scaling. For example a value of ''0.1'' increases/decreases the scaling of the element by up to 10%. If present ''randomizeGeometry.scale'' is ignored. Scaling is done in element space. 
- 
-  * Full name: ''randomizeGeometry.scaleMinimum'' 
-  * Type: float 
-  * Default value: ''0'' 
-  * Example (*.deeclass): <code xml><float name='randomizeGeometry.scaleMinimum'>-0.1</float></code> 
- 
-===== scaleMaximum ===== 
- 
-Uniformly scale element by a random amount from the range ''1 + scaleMinimum'' to ''1 + scaleMaximum''. The value is thus the percentage to increase/decrease the scaling. For example a value of ''0.1'' increases/decreases the scaling of the element by up to 10%. If present ''randomizeGeometry.scale'' is ignored. Scaling is done in element space. 
- 
-  * Full name: ''randomizeGeometry.scaleMaximum'' 
-  * Type: float 
-  * Default value: ''0'' 
-  * Example (*.deeclass): <code xml><float name='randomizeGeometry.scaleMaximum'>-0.1</float></code> 
- 
-====== Required Behaviors ====== 
- 
-This behavior does not required other behaviors. 
- 
-====== Optional Behaviors ====== 
- 
-This behavior does not support optional behaviors. 
- 
-====== Persistency ====== 
- 
-This behavior does not required element class to be persistable (setPersistable). 
- 
-====== API Documentation ====== 
- 
-#@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECABehaviorRandomizeGeometry.html,ECABehaviorRandomizeGeometry~@#. 
- 
-Since DragonScript Module Version ''1.29'' 
- 
-====== Use Cases ====== 
- 
-  * Randomize scaling and rotation of elements to make worlds less uniform. 
  
dragengine/modules/dragonscript/behavior_attachable_randomizegeometry.1761669060.txt.gz · Last modified: 2025/10/28 16:31 by dragonlord