Transformations operations
Last updated
Last updated
Changes the scale of the formation
The formation as whole changes its position
Rotates the formation around an axis
Swarm.scaleFormation(
sx, sy, sz
)
Parameters:
sx: int or float
Set the x scale factor
sy: int or float
Set the y scale factor
sz: int or float
Set the z scale factor
Result: The dimensions of the formation will change, according to the scale selected, some demonstrations are displayed .
Swarm.translateFormation(
tx, ty, tz
)
Parameters:
tx: int or float
Set the distance to move in x
ty: int or float
Set the distance to move in y
tz: int or float
Set the distance to move in z
Result: The formation will translate in the selected distance, the has deeper details.
Swarm.rotateFormation(
anglex_deg, angley_deg, anglez_deg
)
Parameters:
anglex_deg: int or float
Set the rotation angle in degrees for the x-axis
angley_deg: int or float
Set the rotation angle in degrees for the y-axis
anglez_deg: int or float
Set 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 .