Hello All,
I have a question regarding using the setTag function on nodepaths. I’m setting a tag on a nodepath to allow for collision detection. Because of the nature of the game I’m making I need to switch that tag sometimes during the course of the game. The problem I’m running into I think is that each time I’m ‘changing’ the tag I’m actually just adding a new tag to the list of tags on the nodepath. This eventually causes me a problem with collision detection where when I hover over one piece it highlights another.
The solution I think is to remove any tags on the nodepath and then add the new tag. Unfortunately I’m not sure how to remove the existing tags on the node path.
For reference I’m using Panda 1.7 and the line of code I’m using to set the tag in the first place is:
self.hand1card[self.hiHex-127].find("**/Hex").node().setTag('hand1', str(self.dragging-127))
Any help is very much appreciated,
Craig Wells
Graduate Student
ETC