# Change orientation, position of a polyline

**URL:** https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244
**Category:** CesiumJS
**Created:** [August 2, 2018, 8:48pm UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244 "2018-08-02T20:48:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Brian\_Krasner](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@Brian\_Krasner](https://community.cesium.com/u/Brian_Krasner)
#### Post date: [August 2, 2018, 8:48pm UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244/1 "2018-08-02T20:48:42Z")

</div>

**1. A concise explanation of the problem you’re experiencing.**

I have a model of a spacecraft, which I can successfully change orientation and position with properties. I would like to have a polyline(s) coming out of the spacecraft at the same orientation, positions - emulate some sort of rays.

**2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.**

**3. Context. Why do you need to do this? We might know a better way to accomplish your goal.**

Basically want to show spacecraft emitting rays that travel from the vehicle to the ground.

**4. The Cesium version you’re using, your operating system and browser.**

1.45.0, windows, chrome

---

<div class="post-metadata">

### Author: ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)
#### Post date: [August 3, 2018, 9:30pm UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244/2 "2018-08-03T21:30:04Z")

</div>

Hi Brian,

Could you maybe provide a sample image? I’m not sure exactly what your looking for, but I believe adding a [path](https://cesiumjs.org/Cesium/Build/Documentation/PathGraphics.html) to your entity will be what your looking for. You can specify leadTime and/or trailTime to display a line in front of or behind your entity respectively.

Thanks,

Gabby

---

<div class="post-metadata">

### Author: ![Brian\_Krasner](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@Brian\_Krasner](https://community.cesium.com/u/Brian_Krasner)
#### Post date: [August 3, 2018, 10:33pm UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244/3 "2018-08-03T22:33:20Z")

</div>

Thanks for the quick reply. Let me ask you a different question:  
In the SandCastle example [https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html](https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html)

a plane model is changing its position and orientation. There is a path that’s shown but it is not involved in calculating the position or the orientation.

Now suppose I wanted to create a polygongeometry that traveled alongside the plane that changed its position and orientation at the same times the plane did.

Is that possible?

---

<div class="post-metadata">

### Author: ![Brian\_Krasner](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@Brian\_Krasner](https://community.cesium.com/u/Brian_Krasner)
#### Post date: [August 3, 2018, 10:34pm UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244/4 "2018-08-03T22:34:06Z")

</div>

Thanks for the quick reply. Let me ask you a different question:  
In the SandCastle example [https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html](https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html)

a plane model is changing its position and orientation. There is a path that’s shown but it is not involved in calculating the position or the orientation.

Now suppose I wanted to create a polygongeometry that traveled alongside the plane that changed its position and orientation at the same times the plane did.

Is that possible?

![](https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif)

---

<div class="post-metadata">

### Author: ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)
#### Post date: [August 6, 2018, 7:09pm UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244/5 "2018-08-06T19:09:45Z")

</div>

Sure, use a [Callback Property](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/index.html?src=Callback%20Property.html) for each of the properties you want to mirror, and return the value of the plane entity’s property for each.

---

<div class="post-metadata">

### Author: ![Brian\_Krasner](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@Brian\_Krasner](https://community.cesium.com/u/Brian_Krasner)
#### Post date: [August 7, 2018, 2:05am UTC](https://community.cesium.com/t/change-orientation-position-of-a-polyline/7244/6 "2018-08-07T02:05:41Z")

</div>

Looks like what I’m looking for. Thanks
