<Collide> { Polyset keep descend } (Solved)

Hey everyone.

I’ve been searching for FPS Camera examples and I found one I really like. discourse.panda3d.org/viewtopic.php?t=4068

I wanted to edit the level model using 3ds Max. Just added simple non-textured single-sided plane and named it Ground and exported as model. After that, I opened my exported model with Notepad and added { Polyset keep descend } after “Random stuff”. And in game I kept falling through it. Here’s the .egg code :

<CoordinateSystem> { Z-Up }

<Group> character {
  <Dart> { 1 }
  <Group> "Scene Root" {
    <Group> Ground {
    <Collide> { Polyset keep descend }
      <VertexPool> Ground.verts {
        <Vertex> 0 {
          -10 10 0
          <Normal> { 0 0 1 }
        }
        <Vertex> 1 {
          -10 -10 0
          <Normal> { 0 0 1 }
        }
        <Vertex> 2 {
          10 10 0
          <Normal> { 0 0 1 }
        }
        <Vertex> 3 {
          10 -10 0
          <Normal> { 0 0 1 }
        }
      }
      <Polygon> {
        <RGBA> { 1 1 1 1 }
        <VertexRef> { 0 1 2 <Ref> { Ground.verts } }
      }
      <Polygon> {
        <RGBA> { 1 1 1 1 }
        <VertexRef> { 3 2 1 <Ref> { Ground.verts } }
      }
    }
  }
}

Hopefully you can tell what’s wrong. Thanks in advance!

I… Don’t think the { 1 } is supposed to be there… Can you try removing it?

I tried removing it before, but it didn’t help so I restored it. Now I removed it again and it doesn’t work still. Current code :

<CoordinateSystem> { Z-Up }

<Group> character {
  <Group> "Scene Root" {
    <Group> Ground {
    <Collide> { Polyset keep descend }
      <VertexPool> Ground.verts {
        <Vertex> 0 {
          -10 10 0
          <Normal> { 0 0 1 }
        }
        <Vertex> 1 {
          -10 -10 0
          <Normal> { 0 0 1 }
        }
        <Vertex> 2 {
          10 10 0
          <Normal> { 0 0 1 }
        }
        <Vertex> 3 {
          10 -10 0
          <Normal> { 0 0 1 }
        }
      }
      <Polygon> {
        <RGBA> { 1 1 1 1 }
        <VertexRef> { 0 1 2 <Ref> { Ground.verts } }
      }
      <Polygon> {
        <RGBA> { 1 1 1 1 }
        <VertexRef> { 3 2 1 <Ref> { Ground.verts } }
      }
    }
  }
}

Do I have to add something else to scene or select something when exporting level to .egg?

Still require help.

Try changing

<Group> Ground { 

to

<Group> Cube { 

and see if that works.

Ah, works. I just don’t understand why it said.

must have
<Group> *something* { 
  <Collide> { Polyset keep descend } 
in the egg file

Anyways, thanks.

Your code didn’t work just now since the code you copied called for Cube as the Into name.

        highestZ = -100 
        for i in range(self.manGroundHandler.getNumEntries()): 
            entry = self.manGroundHandler.getEntry(i) 
            if entry.getIntoNode().getName() == "Cube": 
                z = entry.getSurfacePoint(render).getZ() 
                if z > highestZ: 
                    highestZ = z 

I was unsure if this was the cause since I am new to Panda myself but if it works then I feel that that is the solution.

EDIT - Nevermind this post. Thanks for your help!