# How to set the camera position

**URL:** <https://forum.techsoft3d.com/t/how-to-set-the-camera-position/3128>\
**Category:** Help\
**Tags:** how-to\
**Created:** [January 12, 2024, 7:31am UTC](https://forum.techsoft3d.com/t/how-to-set-the-camera-position/3128 "2024-01-12T07:31:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhbae](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jhbae](https://forum.techsoft3d.com/u/jhbae)\
**Post date:** [January 12, 2024, 7:31am UTC](https://forum.techsoft3d.com/t/how-to-set-the-camera-position/3128/1 "2024-01-12T07:31:45Z")

</div>

I want to change the location of the camera a little when I click the button.

var cam = hwv.view.getCamera()  
then,

I tried to use setCamera() by setting coordinates using setPosition(), but failed.

and

Is there a file or document that summarizes the functions attached below from the communicator I downloaded?  
It’s not easy to find

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/7/70b81d1f7ae292c1f407808c4296e5a0f9f13c42.png)

Please give me some advice  
Thanks

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [January 12, 2024, 2:20pm UTC](https://forum.techsoft3d.com/t/how-to-set-the-camera-position/3128/2 "2024-01-12T14:20:04Z")

</div>

Hello @jhbae,

Since you did not provide code on how you are using [setPosition](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Camera.html#Communicator.Camera.setPosition), we can’t confirm how it is being used. Worth pointing out is that [setPosition](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Camera.html#Communicator.Camera.setPosition) requires a [Communicator.Point3](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Point3.html#Communicator.Point3) object as the argument to the function.

As a quick example, this code snippet below will NOT work and the camera position variable will be undefined:

```auto
var cam = hwv.view.getCamera();
var camVar = 0.01;
cam.setPosition(cam.getPosition().x + camVar, cam.getPosition().y + camVar, cam.getPosition().z + camVar);
hwv.view.setCamera(cam);

```

But this will work when creating a `Point3` object:

```auto
var cam = hwv.view.getCamera();
var camVar = 0.01;
cam.setPosition(new Communicator.Point3(cam.getPosition().x + camVar, cam.getPosition().y + camVar, cam.getPosition().z + camVar));
hwv.view.setCamera(cam);

```

WIth respect to documentation on the main navigation bar of the Web Viewer, there is not a centralized location for that. I can notify our docs team about making changes. All that being said, the navigation bar does have `mouseover` tooltip functionality which provides additional information on the specific icons.

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![jhbae](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jhbae](https://forum.techsoft3d.com/u/jhbae)\
**Post date:** [January 15, 2024, 7:28am UTC](https://forum.techsoft3d.com/t/how-to-set-the-camera-position/3128/3 "2024-01-15T07:28:42Z")

</div>

> [@tino](#):
>
> WIth respect to documentation on the main navigation bar of the Web Viewer, there is not a centralized location for that. I can notify our docs team about making changes. All that being said, the navigation bar does have `mouseover` tooltip functionality which provides additional information on the specific icons.

I found the functions I was curious about by referring to the tooltip functionality. Thank you
