Another idea... This one was actually suggested by a colleague of mine, and I thought it was already in the software, but am unable to find it. If it already exists, then I am sorry, but please remind me of how to get to it.
The idea is to allow a 3D view to be attached/follow an object in the model. For instance, a sampler could be used to select an object that the view will follow. I am currently doing this with the following code on the views preDraw code (it does have some issues). There is a global variable that is trackedItem that is a reference to the object to track.
The code:
treenode movingView = c; if (objectexists(trackedItem)==1 && objectexists(movingView)==1) { Object theItem = trackedItem; movingView.find(">viewsettings/viewpointx").value = theItem.location.project(theItem,model()).x; movingView.find(">viewsettings/viewpointy").value = theItem.location.project(theItem,model()).y; movingView.find(">viewsettings/viewpointz").value = theItem.location.project(theItem,model()).z; } else { movingView.find(">viewsettings/viewpointz").value=0; }
Additionally it would be cool to not just follow in the x,y,z, but have the camera located from the objects perspective as it moves through the model.