Gazebo | Ignition | Community
Ask Your Question

How to use UserCamera->ViewController()?

asked 2015-03-05 21:21:00 -0500

Zheng yo chen gravatar image

updated 2015-03-05 21:47:08 -0500

I am running gazebo2.2.

I want to control UserCam ,and looked up in API doc(

I found three function as following:

EnableViewController(TRUE); SetFocalPoint(math::Vector3(0,0,0.1)); SetViewController("orbit",math::Vector3(0,1,0.5));

So , I imaged that my userCam would orbit the point(0,0,0.1)

but, It turned out nothing happened!

Did I miss some steps?

Thank you~!

if it is possible, can you check my code?

Here is my code:

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-06 06:12:00 -0500

AndreiHaidu gravatar image

Hi there,

"orbit" is the type of interaction used with the 3d canvas. Meaning when you click the mouse and you move it it orbits the point where you clicked. Or something like that .. :)

In order to move the camera you will have to get the camera pointer and apply new positions for it.

Cheers, Andrei

edit flag offensive delete link more

Question Tools


Asked: 2015-03-05 21:21:00 -0500

Seen: 602 times

Last updated: Mar 06 '15