Collisions and Tags

How does { Polyset keep descend } affect a groups properties?

Here’s my problem:

I have a collision model for a level. I use the entry to give a group a custom tag… for example “MyTag”, and give it a value. I also use the " barrier" entry for the same group.

I write a script, and I use getTag on the group to retrieve my tag… no problems.

I replace the barrier entry above with { Polyset keep descend }, restart the script without changing it… all of a sudden, I can’t get my tag. What happened?

The only difference here seems to be the “keep” keyword…

I don’t see why this should cause a problem. It isn’t throwing anything away, after all…

Have you tried getNetTag?

CollisionNode objects don’t have that method…

but the nodepath they attack to do…

Yes, they do… Works like a charm. Thanks!

I’m still curious as to what caused the problem though, so if anyone has an idea as to why the visible geometry made the tag data disappear, I’d like to hear it.

It’s just that the egg loader had to insert an additional node to be the parent of both the collision geometry and the visible geometry. The tag is assigned to this parent node.

This means that when the collision system returns the actual collision node, it’s no longer the node that has the tag on it–but getNetTag() will still be able to find that tag.

David

Ah… makes sense. Got it, thanks.