Soya3D - problems animating rotation
I've been finding it very difficult to use Soya, due to it's lack of current documentation. I've been looking at the examples that are provided and not many of them work.
I'm trying to write a very simple program - a spinning cube. I can't get it to spin!! Here's my code so far: import sys, os, os.path, soya, soya.cube soya.init() #loads the scene scene = soya.World() #Initializes the color of the cube color = soya.Material() color.emissive = (0.0, 1.0, 0.0, 0.0) CUBE = soya.cube.Cube(scene, color) class RotatingBody(soya.cube): def advance_time(self, proportion): soya.cube.Cube.advance_time(self, proportion) self.rotate_y(proportion * 5.0) spin = RotatingBody(CUBE) camera = soya.Camera(scene) camera.z = 3.0 soya.set_root_widget(camera) soya.MainLoop(scene).main_loop() This is the error message that I'm getting: class RotatingBody(soya.cube): TypeError: Error when calling the metaclass bases module.__init__() takes at most 2 arguments (3 given) * Soya3D * Quit... This program is modelled [almost exactly] after one of the examples on the Soya3D homepage - the actual example loads a 3D sword and spins it. giuseppe also, the proper indentation is present, just not really showing up in this forum |
All times are GMT -5. The time now is 04:00 PM. |