# vtkLight to follow camera facing

**URL:** https://discourse.vtk.org/t/vtklight-to-follow-camera-facing/1855
**Category:** Development
**Created:** [October 3, 2019, 12:04pm UTC](https://discourse.vtk.org/t/vtklight-to-follow-camera-facing/1855 "2019-10-03T12:04:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rai-sam](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rai-sam/32/667_2.png) [@rai-sam](https://discourse.vtk.org/u/rai-sam)
#### Post date: [October 3, 2019, 12:04pm UTC](https://discourse.vtk.org/t/vtklight-to-follow-camera-facing/1855/1 "2019-10-03T12:04:50Z")

</div>

I have disabled automatic light generation. And want to use vtkLight to update light facing as camera. LightFollowCameraOn is not helping out.

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dave_demarle/32/6_2.png) [@Dave\_DeMarle](https://discourse.vtk.org/u/Dave_DeMarle)
#### Post date: [October 3, 2019, 1:17pm UTC](https://discourse.vtk.org/t/vtklight-to-follow-camera-facing/1855/2 "2019-10-03T13:17:42Z")

</div>

vtkLight::SetLightTypeToHeadLight() makes it so that the light moves with the camera always focused on what the camera is pointed at.

vtkLight::SetLightTypeToCameraLight() makes it so that the light moves with the camera, keeping whatever position and orientation you define for it relative to the camera.

Does the later do what you want?

---

<div class="post-metadata">

### Author: ![rai-sam](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rai-sam/32/667_2.png) [@rai-sam](https://discourse.vtk.org/u/rai-sam)
#### Post date: [October 4, 2019, 7:19am UTC](https://discourse.vtk.org/t/vtklight-to-follow-camera-facing/1855/3 "2019-10-04T07:19:01Z")

</div>

@Dave_DeMarle My main requirement is light always focused on where camera is projected with respect to vtkRenderWindowInteractor.

---

<div class="post-metadata">

### Author: ![rai-sam](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rai-sam/32/667_2.png) [@rai-sam](https://discourse.vtk.org/u/rai-sam)
#### Post date: [October 4, 2019, 9:46am UTC](https://discourse.vtk.org/t/vtklight-to-follow-camera-facing/1855/4 "2019-10-04T09:46:11Z")

</div>

Its done. There was a silly typo mistake.

Was calling LightTypeToHeadLight instead of SetLightTypeToHeadLight.
