Modelsunderray is driven ' me craz-ay 2004-03-26 - By Lucas Meijer
Back Hey,
> MUR will not work on the backfacing side of of a polygon. So make sure that > the terrain visibility is #front and is visible from where you are casting > your ray.
IIRC, the visibility of a model has no effect on the result of a modelsUnderRay() call. The modelsunderray only 'hits' the front. if you set the model.visibility=#back, then it still only hits the original front.
> as for removeFromWorld(), realize that this only works for models that are > parented to the group("world"). models that are parented to anything else > must be first parented to the world before they can be removed.
This is incorrect. Any model can be removeFromWorld(), removeFromWorld() is shortwriting for model.parent=void
> and then reparented to their original parents after they are addToWorld().
This will also not work. addToWorld() is shortwriting for model.parent = m3d.group("world") If you first parent your model to its correct parent, you're already where you want to be. If you thereafter call addToWorld(), you make your model child of the world again, nullifying your previous hierarchy setup.
It looks like the misunderstanding comes from the idea that a model has a place in the hierarchy, and a 'yes/no' flag regarding wether it is in the world or not. The 'world' only refers to group("world"). addToWorld() merely makes your model a child of that. In fact this only makes sense if your camera.rootNode = m3d.group("world")
Bye, Lucas __ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|