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 factorsy: int or floatSet the y scale factorsz: 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 xty: int or floatSet the distance to move in ytz: 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-axisangley_deg: int or floatSet the rotation angle in degrees for the y-axisanglez_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