Thanks a ton for responding Claudio. I had the same hunch. I replaced all my shapes to Circle shapes and the collision works fine.
Thanks again for helping out. Regards, Balajee On Wednesday, 1 August 2012 19:20:16 UTC+5:30, Claudio Canepa wrote: > > > > On Wed, Aug 1, 2012 at 5:07 AM, Balajee R.C <[email protected]> wrote: > >> I am have a level containing cshapes of both >> cocos.collision_model.AARectShape type as well as >> cocos.collision_model.CircleShape. Is this a problem? I am getting the >> following traceback of what seems most likely a bug in the code base >> itself. I want to check here before reporting a bug in the tracker. >> >> Traceback (most recent call last): >> File "main.py", line 22, in <module> >> gameManager.startGame() >> File >> "C:\Users\Balajee\Documents\localprojects\Longsword\src\gamemanager.py", >> line 98, in startGame >> cocos.director.director.run(self.mainScene) >> File >> "C:\Python27\lib\site-packages\cocos2d-0.5.0-py2.7.egg\cocos\director.py", >> line 451, in run >> event_loop.run() >> File "build\bdist.win32\egg\pyglet\app\base.py", line 135, in run >> File "build\bdist.win32\egg\pyglet\app\base.py", line 164, in >> _run_estimated >> File "build\bdist.win32\egg\pyglet\app\base.py", line 273, in idle >> File "build\bdist.win32\egg\pyglet\clock.py", line 300, in >> call_scheduled_functions >> File >> "C:\Users\Balajee\Documents\localprojects\Longsword\src\gamemanager.py", >> line 127, in update >> for firstObject, secondObject in >> self.collisionManager.iter_all_collisions(): >> File >> "C:\Python27\lib\site-packages\cocos2d-0.5.0-py2.7.egg\cocos\collision_model.py", >> >> line 725, in iter_all_collisions >> if f_overlaps(other.cshape): >> File >> "C:\Python27\lib\site-packages\cocos2d-0.5.0-py2.7.egg\cocos\collision_model.py", >> >> line 424, in overlaps >> return ( abs(self.center[0] - other.center[0]) < self.rx + other.rx >> and >> AttributeError: 'CircleShape' object has no attribute 'rx' >> >> Can someone please tell me what might be going wrong? >> > > > With the current codebase you can't mix different shapes in the same > collision manager. > > > -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/cocos-discuss/-/XpkYLmdjpF8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
