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