# How to moving z-direction vertically against the feature

**URL:** <https://forum.universal-robots.com/t/how-to-moving-z-direction-vertically-against-the-feature/24292>\
**Category:** Technical Questions\
**Created:** [October 7, 2022, 8:13am UTC](https://forum.universal-robots.com/t/how-to-moving-z-direction-vertically-against-the-feature/24292 "2022-10-07T08:13:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fujikit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/fujikit/32/6042_2.png) [@fujikit](https://forum.universal-robots.com/u/fujikit)\
**Post date:** [October 7, 2022, 8:13am UTC](https://forum.universal-robots.com/t/how-to-moving-z-direction-vertically-against-the-feature/24292/1 "2022-10-07T08:13:33Z")

</div>

I want to execute the function script that make the robot’s TCP z-direction move vertically with respect to the selected feature in similar with the below.  
How do I do it?

![スクリーンショット 2022-10-07 171250](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/1/1856f6277ca0dc3c9c60280cd68be5c585ff3d14.png)

---

<div class="post-metadata">

**Author:** ![eric.feldmann](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eric.feldmann](https://forum.universal-robots.com/u/eric.feldmann)\
**Post date:** [October 7, 2022, 12:33pm UTC](https://forum.universal-robots.com/t/how-to-moving-z-direction-vertically-against-the-feature/24292/2 "2022-10-07T12:33:33Z")

</div>

Haven’t tried it myself, but can you just take the current TCP pose and substitute RX and RY for the values of the Feature?

---

<div class="post-metadata">

**Author:** ![pawel.blocki](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@pawel.blocki](https://forum.universal-robots.com/u/pawel.blocki)\
**Post date:** [October 7, 2022, 12:42pm UTC](https://forum.universal-robots.com/t/how-to-moving-z-direction-vertically-against-the-feature/24292/3 "2022-10-07T12:42:24Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/c/cae9fe2ecd0b7b13ef8a46b816a32b6ce7293f1c.png)  
This should work for you
