Robot movement

38 views
Skip to first unread message

KUMAR SIDDHANT

unread,
Jun 23, 2013, 2:40:26 AM6/23/13
to 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
Message has been deleted

KUMAR SIDDHANT

unread,
Jun 24, 2013, 2:38:59 AM6/24/13
to 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

unread,
Jun 24, 2013, 4:26:46 AM6/24/13
to 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

unread,
Jun 24, 2013, 10:39:51 AM6/24/13
to 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.
 
 

Reply all
Reply to author
Forward
0 new messages