Setting Ogre3dCam position not working
rr last edited by ANVEL Team
In the internal Python console, running the following:
v = Anvel.AnvelApi.GetObjectInfoByName("World View 1 - Ogre3dCam")
Anvel.Simulation.SetProperty(v.Id, 'Position', ' -128.78857421875 -1.298326134682 35.487865447998 ')
This should move the view over to the right 100m, but nothing happens. The position coordinate values change in the World View 1 - Ogre3dCam property window, but this is not reflected in the actual view position. And as soon as I move the view manually, the property values snap back to what they were before I issued the command. This happens regardless of whether the simulation is running or not. Any advice appreciated.
@rr said in Setting Ogre3dCam position not working:
"World View 1 - Ogre3dCam")
The answer to this is two-fold.
- Using GetObjectInfoByName returns the id for the "WorldObject" part.
- To set the View property, you want the id for the "View" part.
Anvel.GetIdsByTypeName("View")to retrieve this id.
rr last edited by
It worked - thank you!
This post is deleted!