Collision Detection Question

Hey,
OK I have a level created in Maya, and I want to set up collision detection so the actors within the level will collide with all the geometry of this level. But I can’t seem to accomplish this. I am able to set up a collision spere around my actor and set up the pusher handler etc., but when it comes to setting up the collision with the level I’m stuck.

I’ve tried doing this …
cnode.node().setFromCollideMask(GeomNode.getDefaultCollideMask())
… but this results in tons of lag, and my actor connected to the cnode just vanishes.

Are my only other options to manually create all the collision geometry for the level, or add tags within the .egg file of the level?

Thanks for any help!

I have no clue about how the collision thingie works for now, but may be there could be a small py-tool that can create a collision sphere/object/plane for every visible (and thus exposed for a actor) object in a egg-file? (for example) Maybe it can store the collision models in a separate egg file…

Of course, this might be a bit work, but it would reduce the work later on because all you need is to mod the “collision” egg file what would be much easier than creating each and every collision object on your own…

But of course I do have NO clue about the performance impact that this might have…

Regards, Bigfoot29

I faintly remember the video tutorial for the scene editor. Seemed easy enough there to do colliders etc.

But I didn’t do extensive collisions yet, so I can only suggest to try it - no warranties! :wink:

Well, as far as I know there is actually no working Scene Editor for Linux… some guys developed it under/for Windows where this pice of code is working because windows doesn’t care about file name cases (lower or upper)

However, its here also quite some time ago that I messed around with that…

Regards, Bigfoot29

Just two things.

  1. When you want the level to be tested for collision, you just have to set proper collision flag.
    =>never add it to the collision traverser, the level must stay a passive collider, else it would decrease hugely the perfs.

  2. What i do personnaly is in the 3D soft, i do a low poly copy of the level.
    I put the barrier flag on this copy.

At loading time, i reparent the “barrier” copy at the real level . and i flag the 'barrier" copy instead of the real level. So i’ve got the visual candies without stucking up the collision detection.

  1. I started to add the possiblity to make any model the Collision Model in the scene editor. However it was for Panda 05 .Now for Panda 1 i’m still in the process of having the Scene Editor work as well as before the migration…

The scene editor is plattform-dependent? Really? I have to try this next time I boot Ubuntu…

If so, that calls for a fix. It can’t be too hard to do, provided that case-sensitivity is the only problem there.

Manakel: Thx for the infos… the question is: How to make a simple poly version of a level…, spaceship or whatever… I, for example, make modular levels/models. (easier to change things later in-game). It would be nice to have a tool that just recalculates the surface of - lets say - 20 edges per model - or just a sphere that matches the model… however, its late here and I am talking weird stuff again :smiley:

Marc: As far as I know there IS the only problem with the capitals… but it were many, so I just booted my ol’e Win partition to mess a little bit around with it and the video tuts… Found another bug that the “sphere”-object could not be loaded and thus this particular tutorial was dropped :slight_smile: - but that was with Panda 1.0.5. NO clue about 1.1, haven’t even installed it until there is a real solution for “how to fix what” because I get really fast pissed off when I want to run a piece of demo code and it cowardly refuses to run…

Regards, Bigfoot29

Sounds like something that can be solved - is anyone maintaining the scene editor? Josh?

That’s true, OTOH. Maybe 1.0.5 should remain available for download, as long as 1.1.0 is beta - er, Josh? :slight_smile: