Community Forum
ANVEL Licensing Options

Setting Ogre3dCam position not working

  • ANVEL 3.0
    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.

  • administrators

    @rr said in Setting Ogre3dCam position not working:

    "World View 1 - Ogre3dCam")

    The answer to this is two-fold.

    1. Using GetObjectInfoByName returns the id for the "WorldObject" part.
    2. To set the View property, you want the id for the "View" part.


    Use Anvel.GetIdsByTypeName("View") to retrieve this id.

  • It worked - thank you!

  • administrators

    This post is deleted!