A Minimal Collision-setup

punzip != unzip

the punzip tool comes with your panda installation. it’s a command line utility. if you export from blender you can also deactivate the pzip button. which will get you an egg in first place.

I read the opposite…
Also stevemiller.net/punzip/ says “Pocket Unzip” across the top. I’m a bit confused.

Going by my observations I was lead to believe that the .egg.pz files needed to be decompressed into regular .egg files. I’m specifically trying to open up the world.egg.pz from the roaming ralph tutorial.

Do you know if this is at all possible with another utility or if I can open and edit the tags to a .egg.pz directly with another program?

That is really a different punzip. You have to use the punzip tool that ships in the Panda3D bin directory.

That is what I needed. Goodbye .pz extension…

Thanks!

Sorry to dig up an old thread :blush:

…but: would I be correct in saying that the code sample given really finds intersections and not actual collisions?

e.g., in my code, I had to add:

# 0.4 is just a visual adjustment
if (entry.getSurfacePoint(self.render).getZ() >= (self.player.getZ()-0.4)):
    self.collisionLabel.setText("DEAD: "+ str (globalClock.getFrameTime() ) )

…in other words, yes - find the intersection, but then check the player Z value to confirm it is a ‘real collision’. Without the additional check, I get constant collisions.

It’s a flight game I’m working on so player has free roam, not just running/walking/held to the terrain. I’m using a CollisionLine at the moment (because the player can fly upside down) but have tried the Ray.

I also tried using a collision sphere - but, again, I got constant collisions. I was hoping I could just add a suitably sized sphere around the player and then get collision entries only when the sphere actually hits the terrain. Instead, I’m getting collisions all the time and have to do this ‘additional check’ bit.

Have I misunderstood something? Very possible! :slight_smile:

Thanks,
Gary

since i dont know your code, i dont know what you’r doing wrong in that particular case.

collisions are in fact, intersections of collision solids.

maybe you forgot to call the collision traversal each frame, in my example i only call it once because nothing moves there. but that’s only a blind guess.

i’m a panda beginner, so perhaps i get this totally wrong. But if you’re using a CollisionLine as collision solid it’s normal to get constant collisions, because the Line collides with the ground, even if the player is far away (a line is infinite, isn’t it?).

What i don’t understand is that you get constant collisions when using a sphere around the player. Perhaps you scale the sphere to big? :wink:

just my two cents :slight_smile:

Thanks to both, it is clear now - I had misunderstood. :slight_smile: