I see a few solutions. Pick the best for your code structure: 1.) Simply call enable(viz.COLLISION), in whatever code tells the avatar to “walk out again.” 2.) Leave enable(viz.COLLISION) in the RestoreAvatar function and call RestoreAvatar when you want the character to walk out again. 3.) You could delete the object (I assume it is a bullet?) that is intersecting with the character with bullet.remove() in your intersection handling function.
|