I am trying to get an effect on the nodes of an egg file which are collided into.
collEntry = nodePath.find("**/model01").getChildren().hide()
This code affects all the children.
How can I affect only the children that are collided into?
Also, isn’t this supposed to find all the nodes beginning with model_part?
collEntry = nodePath.find("**/model_part*")
I tried this on my egg file and it returned:
I don’t get it…
It’s been said that persons on the forums are always willing to help, and for the most part that is true. I don’t think my question is complicated, nor is it one that is clearly addressed in the manual or the api, so I would assume that it would be a question that I should receive a reply at least. Is there any help available for the above question?
Well, what is the output of nodePath.ls() ? Does it contain the nodes you are looking for?
If not, look in the .egg file, does it contain the entries named like that? If so, it’s flattened automatically by the egg loader and you need to flag that node as unflattenable.
Is it an Actor or model ? May be you can post your egg file or make it downloadable to have a look.
nodepath.ls() returned this:
ModelRoot grass_patch03.egg T:(pos -185 190 0.75 scale 0.65)
GeomNode (1 geoms: TextureAttrib)
I tried guessing how to make the node ‘unflattenable’. So I tried unstash and clearEffect. Nothing doing.
Here is the link to the egg file:
I have this problem before for a character model:
discourse.panda3d.org/viewtopic … highlight=
The answer is:
For a character model, the geoms are automatically combined together at load time by default. To avoid this, use “egg-optchar -flag” and give a different name to each of the pieces you wish to use individually.
But I am using blender with Chicken. I am not sure about other exporter.
Whew! That was a lot of work renaming all those nodes. Let’s see…
Oh no. Now my frame rate is down be 10. I can’t use this, It was better optimized.
Thanks guys, but I have to use a different method. That method slowed my game too much. I learned something though. I now know how to find nodes on an optimized egg, and I also learned that I can take advantage of panda’s auto flattening. So I can merge a lot of static objects, which would then be flattened automatically, cutting down on cpu usage.
Thanks for answering my question.