turning and collision mesh

I have two questions.

  1. I am using these simple codes found in one of the BVW Scripting Tutorials, for turning my model.

def turn(self,dir):
pandaTurn = self.panda.hprInterval(.2,Vec3(self.panda.getH()-(10*dir),0,0))

The model turns, but only one degree per key-press. I want the model to turn until the button is released. Likewise in walking forward.
I noticed that the Tutorial Roaming-Ralph accomplishes just what I want. However the coding is a bit complicated for me.
I’m guessing the same can be accomplished using the coding from the BVW Scripting Tutorials, but I am sure it will require a little math, which I am not all that good at.
Can someone help me with a simple code for rotating my model, and moving it forward continuosly until the key is released?

  1. In the Tutorial Roaming-Ralph, I came across this piece of infomation:
    # Set up the environment

    This environment model contains collision meshes. If you look

# in the egg file, you will see the following:
#    <Collide> { Polyset keep descend }
# This tag causes the following mesh to be converted to a collision
# mesh -- a mesh which is optimized for collision, not rendering.
# It also keeps the original mesh, so there are now two copies ---
# one optimized for rendering, one for collisions.  

How does one look in the egg file, and how does one tag a mesh to be converted to a collision mesh. Thanks

How do I create a button that holds it position in the corner of the screen, doesn’t rotate or move, even though all other objects in the scene move and rotate, including the camera - sort of like a gui, only instead of a 2d image, its a 3d clickable object? Thanks.

49 views, and NO replies!
This has never happened to me in all the forums that I have ever been on.
I guess I am playing with the big boys now.
So I need to stop posting silly questions, and do my own research.
OK. I will. I’ll search every topic on the forum which deals with the topic I want to know about. It’s a lot of searching, but I’ll do it, even if it takes me the whole night on my slow internet connection.

Solution to your first problem:

self.speed=10.0 #adjust it if you need
taskMgr.add(self.turnTask,"i'm tina!")

def turnTask(self,task):
def turn(self,dir):

I didn’t test it, but it should work.
change self.speed if you need it slower or faster.

I will check out the code tonight, but I just want to thank you for responding.
I found infomation on collision mesh. Thanks