# How to translate parent by child's axis

**URL:** <https://discourse.threejs.org/t/how-to-translate-parent-by-childs-axis/23708>\
**Category:** Questions\
**Tags:** animation\
**Created:** [February 22, 2021, 6:17am UTC](https://discourse.threejs.org/t/how-to-translate-parent-by-childs-axis/23708 "2021-02-22T06:17:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mel\_Liu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mel_liu/32/14130_2.png) [@Mel\_Liu](https://discourse.threejs.org/u/Mel_Liu)\
**Post date:** [February 22, 2021, 6:17am UTC](https://discourse.threejs.org/t/how-to-translate-parent-by-childs-axis/23708/1 "2021-02-22T06:17:52Z")

</div>

I have two object: parent and his child.  
child can move by arrow key and aways look at parent  
parent move by ‘w’ ‘s’ ‘a’ ‘d’ key  
now parent can move by self (or world) axis, but how make parent move by child axis?

---

<div class="post-metadata">

**Author:** ![felixmariotto](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/felixmariotto/32/5928_2.png) [@felixmariotto](https://discourse.threejs.org/u/felixmariotto)\
**Post date:** [February 22, 2021, 7:13am UTC](https://discourse.threejs.org/t/how-to-translate-parent-by-childs-axis/23708/2 "2021-02-22T07:13:02Z")

</div>

I guess you could just rotate the target direction vector according to the child’s rotation :

`targetDirection.applyQuaternion( child.quaternion )`
