I noticed something today that I think *might* be a bug. In my game, at runtime, I can add a new mesh into the world. This is working great. Now in my game the user can ‘select’ meshes by
clicking on them. I use the Geometry.Intersects method to detect if a specific mesh has been clicked. This is also working great. The trouble comes in when I try to dynamically resize the mesh at run time. (Say I make it bigger) Now I do this by adjusting
the property on the mesh called World. If I scale up a mesh in this way the Geometry.Intersects method no longer detects a mesh intersection.
What I believe to be the trouble is the bounding sphere of the mesh. This is not calculated when the mesh intersection test is done, but pre-calculated some other time. When I change the world matrix on a specific
mesh, this bounding sphere stays the same. Since I’m increasing the size of the object, I would expect the bounding sphere to grow.
Now the weird thing about this is that I can turn on bounding spheres (as a test) to view them as I move around my world. It would appear that the bounding sphere IS being calculated correctly for the drawing. Just
not when intersection tests are done.
Does Balder support directly setting the world matrix on a mesh? If so, shouldn’t the bounding sphere either be adjusted, or recalculated for an intersection test?
Thanks for any advice anyone can offer.