Having problem creasting collision mesh by editing .egg file

Hi. I’ve been looking into both ball-in-maze and roaming ralph tutorials, trying to figure out how to use collision(the collision part of Documentation>>Manual is lacking details for implementation).

I found out that

<Collide> { Polyset keep descend }

is added into the .egg file for both tutorial for every most inner tag. And the collision mesh can be seen using pview with shift-c turned on.

In world.egg for roaming ralph:

<Group> terrain {
  <Collide> { Polyset keep descend }
  <VertexPool> terrainShape.verts {
    <Vertex> 1 {
      -127.129 3.53365 71.7998
      <UV> { 0.992756 0.992756 }
      <Normal> { 0.0910537 0.945108 0.313815 }

In maze.egg :

<Group> maseH_baked_temp {
  <Group> wall_collide {
  <Collide> wall_collide { Polyset descend }
    <VertexPool> wall_collideShape.verts {
      <Vertex> 1 {
        -2.22045e-016 1 3
        <UV> { 0 0 }
        <Normal> { 1 0 0 }
        <RGBA> { 0.5 0.5 0.5 1 }
      <Vertex> 2 {
        1.11022e-016 -1 3
        <UV> { 1 0 }
        <Normal> { 1 0 0 }
        <RGBA> { 0.5 0.5 0.5 1 }

And here is my problem: After I edited street-scene.egg in the model i got from Downloads/3D Model>>Environments http://panda3d.org/artinfo.php?cat=environments&fn=bvw-f2004–streetscene

with the exact syntax:

<Group> UV_Streetscene_main {
  <Dart> { 1 }
  <Group> groundPlane_transform {
  <Group> pPlane1 {
    <Group> polySurface8 {
      <Collide> { Polyset keep descend }
      <VertexPool> polySurfaceShape22.verts {
        <Vertex> 1 {
          -37.973 5.27148e-007 -13.0836
          <Normal> { 0 1 0 }
          <UV> { 0.0125847 0.350248 }
          <RGBA> { 1 1 1 1 }

for every most inner tag I could find. I couldn’t see any collision mesh in pview when shift+c is used to check collision mesh. I tried wired frame(w), texture on/off(t).

If anyone had any experience or idea, please reply. Also, it there a better documentation for the syntax of egg files? I couldn’t find any.
Thanks in Advance :smiley:

If you can’t see the collision polygon with pview, it could be the tag, (indicating the egg might contain animation) which blocks the find() process. But the collision polygon maybe exist there, just couldn’t be seen. If you insist want to see it with pview, remove the tag temporarily. I’m not sure either if the tag also blocks the collision traversal.

ah, it’s positive : you can’t have collision under tag.
so, if you’re sure that the model is static, remove the tag away for good !
Some of the models here were exported incorrectly with tag. :astonished:

Sweet! I took out the tag and it starts working instantly. Thanks a bunch ynjh_jo! I was about to throw myself out of the window.

Also, I have two questions:
I am wondering is there a reference or manual fpr tags used in .egg file?
I took out tag in one of my other environment.egg and only a part of it is displayed in pview. How would I be able to fix that? There is no animation involved at all.

Sure there is, it’s eggSyntax.txt, get it here : panda3d.cvs.sourceforge.net/pand … a/src/doc/

I don’t know, never have somthg like that before. The best thing to do is creating your own models, so you know every part of it. :slight_smile: