Transformations operations
Changes the scale of the formation
The formation as whole changes its position
Rotates the formation around an axis
Swarm.scaleFormation(sx, sy, sz)
Swarm.scaleFormation(sx, sy, sz)- Parameters: - sx: int or floatSet the x scale factor
- sy: int or floatSet the y scale factor
- sz: int or floatSet the z scale factor
 
- Result: The dimensions of the formation will change, according to the scale selected, some demonstrations are displayed here. 
Swarm.translateFormation(tx, ty, tz)
Swarm.translateFormation(tx, ty, tz)- Parameters: - tx: int or floatSet the distance to move in x
- ty: int or floatSet the distance to move in y
- tz: int or floatSet the distance to move in z
 
- Result: The formation will translate in the selected distance, the Transformations section has deeper details. 
Swarm.rotateFormation(anglex_deg, angley_deg, anglez_deg)
Swarm.rotateFormation(anglex_deg, angley_deg, anglez_deg)- Parameters: - anglex_deg: int or floatSet the rotation angle in degrees for the x-axis
- angley_deg: int or floatSet the rotation angle in degrees for the y-axis
- anglez_deg: int or floatSet the rotation angle in degrees for the z-axis
 
- Result: The formation will rotate in the selected axis, to see more information about this operation, check the Transformations section. 
Last updated
