Collisions in Roaming Ralph: where are the ground collisions

First of all you have to know the difference between CollisionNode and GeomNode…look at this thread to see the problem faced me before

[Solved - Slowing down when to use mouse on 3d object)

In Roaming-Ralph example, the programmer used the CollisionNode method

To see if the used is CollisionNode or GeomNode you can write the code:

print Nodepath.ls()

then all the nodes will be displayed

About the collision with the terrain, you have to notice that the file world.egg.pz has lots of nodes and one of it is called “terrain” and the code you will find is:

if (len(entries)>0) and (entries[0].getIntoNode().getName() == "terrain"):
            self.ralph.setZ(entries[0].getSurfacePoint(render).getZ())

and there two examples to differentiate between the two ways of collisions to be more clear

4shared.com/file/GterwbXn/GeomNode.html

4shared.com/file/h8HuV4be/CollisionNode.html

Note: in those two examples I forgot to remove this useless code

if self.myHandler.getEntry(0).getIntoNode().getName()=="sphereNode":
     self.gx+=1

in the last lines…so don’t be conflicted