Operating System: win10
Render System: GL3+
This is the original sample code:
Code: Select all
mSwordTrail = (RibbonTrail*)sceneMgr->createMovableObject("RibbonTrail", ¶ms);
I tried to do it this way
Code: Select all
class SwordTrail(Ogre.MovableObject,Ogre.RibbonTrail):
def __init__(self,name,scn_mgr,numberOfChains,maxElements):
Ogre.RibbonTrail.__init__(self,name,maxElements,numberOfChains)
Ogre.MovableObject.__init__(self,name)
Code: Select all
Traceback (most recent call last):
File "tmp.py", line 672, in <module>
app.initApp()
File "tmp.py", line 658, in setup
self.char=sinbad(self.cam)
File "tmp.py", line 44, in __init__
self.setupBody(cam.getSceneManager())
File "tmp.py", line 67, in setupBody
self.swordtrail=SwordTrail("RibbonTrail",scn_mgr,2,80)
File "tmp.py", line 17, in __init__
Ogre.MovableObject.__init__(self)
TypeError: Cannot create new instances of type 'SwordTrail'