chicken and collision

I’m using Blender 2.48a and Chicken R91 with Python 2.5. (So that Blender uses Panda’s Python.)

I can export meshes/textures fine; if I export stuff with octree/collisiontree settings, I don’t get an error message.

I tried to mess with the Roaming Ralph demo: changed the character to one made by me, and the collisions worked fine. However when I tried to change the terrain to a mesh of mine, the collision ceased to work *(it’s just a plane, with some bumps, just like the original). I found out that the collision queue is always empty, and my actor is constantly put back to the starting position.
Could someone elaborate, how to set up collisions on chicken exported models? When to use the collision-tree options?
I thought I would go for the simpler “collide with geometry” route, but there’s nothing about it in the manual.

  • I took care of the object’s name

What I noticed is that the original Ralph world.egg has lines like this:

<Group> trees_piece_18 {
    <Collide> { Polyset keep descend }
    <VertexPool> trees_piece_18Shape.verts {
      <Vertex> 1 {
        -86.4549 4.18647 -0.604374

However mine has lines like this:

            <Group> "leaf 6-4 (1 tri)" {
              <ObjectType> { barrier }
              <Polygon> {
                <VertexRef> { 792 793 795 <Ref> { Plane } }

that different is not so critical.
in the original world.egg the visual geometry is used as collision geometry.
in the collision-octree those are seperate sets of geometry (which is a lot faster).

your actual problem is probably caused by

if (len(entries)>0) and (entries[0].getIntoNode().getName() == "terrain"):

in the roaming ralph code. it checks if the collision appeared on a node named “terrain”. you may whish to replace that name with the name of the node which contains your ground. or you rename that node to “terrain”. or you delete that check entirely.

when I wrote “I took care of the object’s name”, I meant that. I renamed both of them to “Plane”.

What confuses me is why there’s no need to call



In this thread they say I have to set the Collide property in Blender. Isn’t there a way to do this from Panda? (In case I may have many objects.)

Setting the attribute solved the collision problem, but now I don’t see the terrain (but I know that Ralph moves because I print out his coordinates), although I’ve added light, and call

Actually,calling “show” on the “environ” didn’t work as it’s not the “Plane” itself, but a parent of the Plane. However calling “show” on the Plane resulted in a trianglemesh drawn(with edges, without shading). However, I found another useful thread
here. It says, that you should set the objects attribute in Blender to “Polyset keep descend”, where the keep means, that it should be drawn as well.