# Map the forward ray back to camera

**URL:** <https://forum.babylonjs.com/t/map-the-forward-ray-back-to-camera/14049>\
**Category:** Questions\
**Created:** [September 9, 2020, 9:45pm UTC](https://forum.babylonjs.com/t/map-the-forward-ray-back-to-camera/14049 "2020-09-09T21:45:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuxin](https://avatars.discourse-cdn.com/v4/letter/y/c2a13f/32.png) [@yuxin](https://forum.babylonjs.com/u/yuxin)\
**Post date:** [September 9, 2020, 9:45pm UTC](https://forum.babylonjs.com/t/map-the-forward-ray-back-to-camera/14049/1 "2020-09-09T21:45:34Z")

</div>

Hi! I can use ‘getForwardRay’ to capture the current forward direction of the camera, and I want to set the current forward direction of the camera using the recorded forward direction data. Is there a way to do thise?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [September 10, 2020, 9:05am UTC](https://forum.babylonjs.com/t/map-the-forward-ray-back-to-camera/14049/2 "2020-09-10T09:05:02Z")

</div>

I think you can simply pass `recordedForwardRay + camera.position` to `camera.setTarget`.
