cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

An option to have a view follow an object

An option to have a view follow an object

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.

6 Comments

This is very similar to this other idea.

Ben_WilsonADSK
Community Manager

As mentioned in the post @Matthew Gillespie linked, there is the Cams Module, which doesn't do exactly what you're asking, but is along the same lines.

Direct link to latest Cams module.

chris_smith7
Not applicable

Thanks, that is the same request... Sorry to create a duplicate idea. I am unsure why, but I tried to search for a similar idea using camera, view, and follow, but that other post didn't show up (until the recent comment was added). I just realized that my search results in answers is just showing the last days posts, but I have the anytime filter on the search. Is that just me?

Ben_WilsonADSK
Community Manager

Thanks for the heads up.

The site was having some issues, so AnswerHub, the provider for this forum, rebuilt the site on Friday. It appears that searches are only looking at content since the rebuild.

We'll see what we can do to re-index the entire site.

cody_barniak
Not applicable

Hi Chris, where do you enter this code? I want to attach the camera view to follow a moving forklift (and other objects) in order to make a video of my model. Any suggestions or pointers would be helpful. Thx Cody.

Jacob_Gillespie
Autodesk

This feature will be available in the upcoming FlexSim 17.2.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea