Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to use UserCamera->ViewController()?

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

Zheng yo chen gravatar image

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

I am running gazebo2.2.

I want to control UserCam ,and looked up in API doc(http://osrf-distributions.s3.amazonaws.com/gazebo/api/2.2.1/classgazebo11rendering11UserCamera.html#a7148635d156d63c3e163bf1c28bb547e)

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: http://pastebin.com/emWnSf00

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

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
Login/Signup to Answer

Question Tools

Stats

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

Seen: 453 times

Last updated: Mar 06 '15