View Single Post
Old 18th February 2011, 05:42 AM   #2
Professional user
Andy's Avatar
Join Date: Jun 2003
Posts: 4,459
Default Re: Get/Set Camera Position From C++

Almost, but the camera is not an ACObject.but an ACEntity.

Once you have the ACCamera from
you should be able to use the ac_entity_set/get* functions to set/get the values. (origin (Point3), location
(Point3), rotation (Point3), spin (Point3), scale (float), move_dist (float), move_angle (float), walk_vehicle (Boolean), offset (Point3), fov (float))

The ac_camera_move_* functions should work fine although you may need to redraw the view after(?) You must ensure that it's in walk mode for many of the functions to work, since they don't make sense in spin mode.

You may also find that a lot of this can be done from a script too. You can also call tcl_command(char *) with a script command inside your plugin.

Andy is offline   Reply With Quote