Uncorrect value return by getPos on a node inside an egg

Hi all.
I have a model that contain 2 groups, tagged “room” and “door”, but when access to node.getPos(render), value is not correct.

nodes=self.environment.findAllMatches("**/=myTag=door")
for item in nodes:
  print item.node.getPos(render)

I have strange matrix into my egg, is it possible that it’s modifie the absolute position of a node.
If it’s the case, how can i solve this according that i did not really understand what matrix was ( it’s difficult for me to understand english ).

Here is a piece of my egg

<Group> Scene_Root {
  <Group> door3dad {
    <Transform> {
      <Matrix4> {
        0 0 -1 0
        0 2.25 0 0
        0.1 0 0 0
        6 0.15 -5 1
      }
    }
    <Group> door3 {
	<Tag> myTag {door}
      <VertexPool> apertureObj3 {
        <Vertex> 0 {
          5.95 0.024999 -5.5
          <Normal> { -1 0 0 }
        }

Thank for your time
Regards

In general, transforms that appear in an egg file are flattened automatically when the egg file is loaded. This is done because very often there is a cost to having transforms in the scene, and usually transforms that appear in an egg file are there unintentionally.

This means that when you find a sub-model within an egg file and call getPos() relative to the root of the model, you get the answer (0, 0, 0).

If what you wanted was the accumulation of the transforms instead, you should add the tag:

<DCS> { 1 }

within any entry that also contains a entry. This will prevent the transforms from being flattened out. Depending on your modeling package and conversion tool, you may be able to do this automatically at the time of conversion.

David

Yes, thank you very much, that’s working perfectly.
Just tell me please, how do you know about this tag. I’ve seach but all i found is { boolean-value } and { dcs-type }, but did not found explanation about what dcs and dcs-type was.

Thanks again

z

I believe DCS stands for Dynamic Coordinate System.

From the .egg documentation (panda/src/doc/eggSyntax.txt in the source):

Well, i can not find this panda/src/ directory, but i will :smiley: .

Thanks again