Enviroment Problem

Enviroments made in Maya, exported to .egg should have any special feature? I haven’t been able to load any environment, even in the roaming ralph sample

what does pview show?

Pview is the best way to know if your Egg file is ok for a standard Panda3D program.

Regarding the use in RoamingRalph, there is an special condition also
=> we use a dummy node in the environnement as a start position for Ralph.

So it’s needed that Egg file got a node called “start_point”.
ralphStartPos = self.environ.find("**/start_point").getPos()

It can be a single face, or a cube or anything you want, but it must be named start_point.

In Pview, with shift+L you can display the whole hierarchy so you can also look out for a start_point node.

I got the same problem & have a few questions…

The standard environment models I noticed have the .pz extension - is this just a naming convention or can I leave my modeled environment as a .egg?

I have looked at the hierarchy of my environment & there’s no start point

How do I set a start_point node in the model? - literally model anything & just name it start_point?

thx in advance for ur help

pz extension means the file was compressed using pzip. You can uncompress it by typing ‘punzip filename’. Panda can use models even when they’re compressed.

Ok thanks for that…
this just leaves 1 last problem…

I have looked at the hierarchy of my environment & there’s no start point

How do I set a start_point node in the model? - literally model anything & just name it start_point?

well we got a model in the environment without a start_point. But the characters movements went quite crazy? forwards & jump resulted in back jumps etc…

furthermore, I opened the default panda environment & looked at the hierarchy but i couldn’t find a start_point node???

of course u can see start_point node. when u press shift+L in pview, the whole hierarchy will display at the console window in text.

yes I noticed the hierarchy displayed in dos & didn’t see any start_point node.

u’ll see it at the bottom.

start_node?

Note “environment” may be a bit confusing here.
We are not talking about the file “environment.egg” in models folder.

We are talking about the file you use as environment (could be called world.egg, arena.egg,floor.egg …) for your roaming entities.

By the way, in Roaming Ralph sample , the environment is the file world.egg.pz

In this file, the “start_point” is present at the very end of the list when doing shift+L in pview.
GeomNode hedge_piece_30 (1 geoms)
PandaNode distance
ModelNode locator1 T:m(pos -114.997 -39.2583 0)
ModelNode locator2 T:m(pos -116.849 17.0366 0)
ModelNode locator3 T:m(pos -97.8976 17.407 0)
ModelNode locator4 T:m(pos -28.3685 17.7051 0)
ModelNode start_point T:m(pos -107.575 26.6066 -0.490075)
ModelNode point1 T:m(pos -101.239 -48.7202 -0.490075)
ModelNode point2 T:m(pos -41.9526 -6.59018 -0.490075)
ModelNode end_point T:m(pos 21.4595 19.2524 -0.490075)

Note: here in roaming sample, “start_point” has been used.
But you could change it (in code and in egg) to anything you want
(like spawn_player).
It’s only to give to the egg designer a way to indicate a possible start position for RalpH
You could use any other way (like a fixed position whatever the world…)

would any character movement conflicts be cause by inserting a model into an environment with

self.actorNodePath.setPos( -20, 10, 10 )

instead of using a start_point?

I only ask this because - we have tested character movement in two different worlds. One being the standard environment.egg & the other a white-box we created. The character movement in the standard environment is fine but using the same movement code in our white-box results in odd movements.

should not be a problem. The code just gets start point pos and then you set it to the positions that you get. Your odd movement with the box might be caused by other things (like it 2 stories). Explain why the other movement is odd.