[visionegg] Re: position controller and TextureStimulus

  • From: Andrew Straw <andrew.straw@xxxxxxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Tue, 13 Apr 2004 13:19:57 -0700

On Apr 13, 2004, at 9:34 AM, Jordanna Sprayberry wrote:

Hey all,

I have made a function controller to control position, and am trying to get it to change the position of a texture stimulus. The controller works fine, because it will move other objects as it is supposed to. When I load a .jpg file into the TextureStimulus, it displays in the original position specify, but does not appear to update its position after that (ie it never moves). Any suggestions?

Jordanna

A few suggestions:


1) Are you sure that the units you're using are properly scaled according to your viewport (and its projection)?

2) Are you sure that the FunctionController is actually being called? (Add a print statement and make sure it does print something.)

3) Modify the draw() method of the TextureStimulus class to print self.parameters.position to make sure it's changing the way you expect.

Or, to stay away from the source, do this:

class DebugTextureStimulus( TextureStimulus ):
    def draw(self, *args,**kw):
        print self.parameters.position
        TextureStimulus.draw(*(self,)+args,**kw)

And make an instance of DebugTextureStimulus.

Post some code if these don't help.

Cheers!
Andrew

Other related posts: