[Papervision3D] Cast Shadows in PapervisionX CS4 branch
charback at makaimedia.com
Tue Sep 22 12:09:18 PDT 2009
I'm running into a strange problem with shadow casting on multiple planes.
This is for a simple ball-throwing game using Papervison (obviously) and JigLib to provide the physics. I have a number of objects that sit on a shelf with a wall behind them, and have created two perpendicular planes with MovieMaterials on applied on which I want to cast shadows (I had difficulty using the materials of the physics object as the target of my shadows for some reason). My PointLight3D is located slightly to one side of the camera. Finally, I'm using Mr. Zupko's excellent ShadowCaster class to handle the shadows.
Casting onto the back wall works fine-great, in fact-but casting onto the shelf under the objects does not. I continue to get null object reference errors for it, and I'm not sure why. The only significant difference between the two planes is that I'm rotating the shelf plane to make it perpendicular to the back wall, but I have trouble thinking of why that would cause a problem.
Is this a limitation of ShadowCaster? It seems odd that this would be the case, but I suppose it's possible. Does anyone have any ideas what can be done? I know I could probably overcome the issue by adding a second instance of ShadowCaster, but since it's relatively costly (and this is a game, after all) I was hoping to just use the one instance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Papervision3D