Control the object location. An example config file using this control can be found here: https://github.com/3db/3db/tree/main/examples/unit_tests/position.yaml.
This control changes the position of the object (i.e. translates it)
The change in position is relative to the object’s original position.
offset_x: Translation component along the world’s x-axis (default range:
offset_y: Translation component along the world’s y-axis (default range:
offset_z: Translation component along the world’s z-axis (default range:
Construct a BaseControl
root_folder – The folder containing all the data for this 3DB experiment. All paths are lative to his folder
apply(context: Dict[str, Any], control_args: Dict[str, Any]) → None¶
Modify the target give a combination of the inputs the control needs
context (Dict[str, Any]) – A dictionary representation of the current scene.
control_args (Dict[str, Any]) – a dict containing an entry for each of the discrete and continuous parameters declared by the Control
the scene in-place (Modifies) –
return value. (no) –
unapply(context: Dict[str, Any]) → None¶
Undo the modification on a scene
Most of the time, recreating a scene is very expensive, therefore, controls are asked to implement a reverse operation to undo their changes. Controls that need to store state in order to undo their actions should add data to the target object they received.
context (Dict[str, Any]) – The description of the scene to render