Robot movement

已查看 38 次
跳至第一个未读帖子

KUMAR SIDDHANT

未读,
2013年6月23日 02:40:262013/6/23
收件人 python-ogre...@googlegroups.com
I have written this code to run two robots from (0,0,0) n (50,0,0) to (0,0,100) n (50,0,100)
But in my code only a single robot is moving not the other one
please help!


Kumar Siddhant
BTech 3rd year undergraduate
Electrical Engineering Dept.
NIT Rourkela
ROBOTS_MARCH_test.py
已删除帖子

KUMAR SIDDHANT

未读,
2013年6月24日 02:38:592013/6/24
收件人 python-ogre...@googlegroups.com
Actually I rewrote the code and was actually able to animate the two robots marching to a particular destination......but though the animation of the robot is in walking state the animation does not show any walking robot......please help me out with that
 
Code works perfectly.......just some finishing errors.. 
Please run the attachment and help me out with the animation

Thank You 

 
 
ROBOTS_MARCH_test.py

dermont

未读,
2013年6月24日 04:26:462013/6/24
收件人 python-ogre...@googlegroups.com
1) You are calling sf.FrameListener.__init__ twice, do it just once, i.e:

    def __init__(self, win, cam, sc, ent, walk , n ):
        # Subclass any Python-Ogre class and you must call its constructor.
        sf.FrameListener.__init__(self, win, cam)

2) For your demo you need an animation state for each entity, do a global edit and rename self.animationState to self.animationState[x].

        ...
        self.distance = []
        self.animationState = []
        
        for x in xrange(2):
            self.animationState.append(ent[x].getAnimationState('Idle'))
            #self.animationState[x] = ent[x].getAnimationState('Idle')
            self.animationState[x].setLoop(True)
            self.animationState[x].setEnabled(True)
       ...

KUMAR SIDDHANT

未读,
2013年6月24日 10:39:512013/6/24
收件人 python-ogre...@googlegroups.com
Thanks a lot dermont it helped.... 

Kumar Siddhant
BTech 3rd year undergraduate
Electrical Engineering Dept.
NIT Rourkela


--
You received this message because you are subscribed to a topic in the Google Groups "Python Ogre Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ogre-developers/4cnbeUoyAsk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-ogre-devel...@googlegroups.com.
To post to this group, send email to python-ogre...@googlegroups.com.
Visit this group at http://groups.google.com/group/python-ogre-developers.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

回复全部
回复作者
转发
0 个新帖子