# How to use a transformation controller to control the rotation of light helper objects

**URL:** https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849
**Category:** Questions
**Tags:** helpers
**Created:** [April 9, 2024, 5:47am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849 "2024-04-09T05:47:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![wenrenqiang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wenrenqiang/32/54020_2.png) [@wenrenqiang](https://discourse.threejs.org/u/wenrenqiang)
#### Post date: [April 9, 2024, 5:47am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849/1 "2024-04-09T05:47:30Z")

</div>

![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/f/ff09f73f83a1a54ecd19aedc7e463b98e1a87be6.png)

---

<div class="post-metadata">

### Author: ![wenrenqiang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wenrenqiang/32/54020_2.png) [@wenrenqiang](https://discourse.threejs.org/u/wenrenqiang)
#### Post date: [April 9, 2024, 5:51am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849/2 "2024-04-09T05:51:41Z")

</div>

![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/b/8b02d66ec04c56b1f21b23369d8b85713e22de6d.png)

---

<div class="post-metadata">

### Author: ![wenrenqiang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wenrenqiang/32/54020_2.png) [@wenrenqiang](https://discourse.threejs.org/u/wenrenqiang)
#### Post date: [April 9, 2024, 5:55am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849/3 "2024-04-09T05:55:22Z")

</div>

By default, the controller can be used, and the position and direction of the light change when dragging. Now, I want to click on rotation to change the direction of the light, keeping the position unchanged. When translating, I only change the position of the light without changing the direction. How can I modify the Helper to achieve this?

---

<div class="post-metadata">

### Author: ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)
#### Post date: [April 9, 2024, 6:35am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849/4 "2024-04-09T06:35:18Z")

</div>

Depends on what kind of light it is - some lights don’t have a direction and use `target` for positioning instead, in which case you’d need to rotate target around the light position when user is applying the light rotation.

---

<div class="post-metadata">

### Author: ![wenrenqiang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wenrenqiang/32/54020_2.png) [@wenrenqiang](https://discourse.threejs.org/u/wenrenqiang)
#### Post date: [April 9, 2024, 7:54am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849/5 "2024-04-09T07:54:02Z")

</div>

![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/6/86f196a3fb4d73727d7b4ee738d5058c14d752ad.png)  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/7/e/7e0b8701283a42051376c38172778e848089c1c9.png)  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/5/d/5d4bfae0d33976288265368b858c97b350c61ed4.png)  
I don’t understand why the second situation occurs. In the scene, there are only two cubes and one parallel light, and all lights and objects have already turned on shadow generation and reception. The target is at the origin, and the light source is located to the left of the two cubes. If the light is in a wireless distance and directly points to the left, it illuminates the large cube. The small cube should be blocked by the large cube and should produce shadows. Why is it still lighting up? If the light is at the position indicated by the helper and emits light to the left, why are the faces of both cubes glowing

---

<div class="post-metadata">

### Author: ![wenrenqiang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wenrenqiang/32/54020_2.png) [@wenrenqiang](https://discourse.threejs.org/u/wenrenqiang)
#### Post date: [April 9, 2024, 7:57am UTC](https://discourse.threejs.org/t/how-to-use-a-transformation-controller-to-control-the-rotation-of-light-helper-objects/63849/6 "2024-04-09T07:57:36Z")

</div>

![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/1/81982b374992fcc2e5764130c6f5f17854fe549d.png)  
I can understand the first situation, where the small cube is blocked by the large cube, so the surface is black, but how to explain the second situation?
