There are a number of ways to animate objects using Vizard's built-in animation commands. Let's add some plants using loops like we did in the last section and store them in a list:
Add the following action related code and then run the script. You should see all the plants spinning in place:
The first line imports the vizact library which includes many commonly used actions. The second line defines a spin action. In this case, the parameters specify that the 3D model should rotate about the Y axis at a speed of 15 deg/sec. The <node3D>.addAction command applies that action to a specific model.