I discovered today that the modelsUnderLoc command in Shockwave3D has an interesting and very useful quirk. By default, it doesn't return hits against models that have been removeFromWorld'ed. BUT, if you include such a model in the modelList parameter, it does return hits against it.
How is this useful? Well, imagine a game level where you want to have simplified collision detection (testing against boxes instead of the more complex geometry), but don't want to render it. You can construct simple geometry for testing against inside your game world, then remove it, and only use it for testing against. It's all in place, doesn't interfere with "normal" operation of picking in the 3D space, and lets you only test against the simplified geometry.
No comments:
Post a Comment