# Another rotation question

**URL:** <https://forum.inductiveautomation.com/t/another-rotation-question/32918>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [March 8, 2020, 7:15am UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918 "2020-03-08T07:15:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_O](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_O](https://forum.inductiveautomation.com/u/Bob_O)\
**Post date:** [March 8, 2020, 7:15am UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918/1 "2020-03-08T07:15:43Z")

</div>

I want to rotate a group of vision components that include a rectangle and a Line [Sinusoidal] but I can only get the rectangle to rotate. I’ve added a custom property to the group that pointed to the rectangle Angle but only it rotates. The line component doesn’t appear to have an Angle property. What am I missing?

Using Ignition 8.0.8

Thanks,

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 9, 2020, 3:32pm UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918/2 "2020-03-09T15:32:33Z")

</div>

Lines can’t directly rotate; they’re not defined (in the code) as a polygon; they’re just a relationship between two specific points. You’d have to do the math and rotate the points around some coordinate yourself using scripting.

---

<div class="post-metadata">

**Author:** ![Bob\_O](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_O](https://forum.inductiveautomation.com/u/Bob_O)\
**Post date:** [March 9, 2020, 6:43pm UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918/3 "2020-03-09T18:43:53Z")

</div>

Thanks Paul.

---

<div class="post-metadata">

**Author:** ![Bob\_O](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_O](https://forum.inductiveautomation.com/u/Bob_O)\
**Post date:** [March 15, 2020, 11:37am UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918/4 "2020-03-15T11:37:48Z")

</div>

Being new to scripting, would anyone have a reference or links that could help get me started on the basics of doing this rotation?

Thanks for any information and stay safe out there!

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [March 16, 2020, 8:49am UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918/5 "2020-03-16T08:49:12Z")

</div>

You should be using the [`system.gui.transform`](https://docs.inductiveautomation.com/display/DOC80/system.gui.transform) function to move non-drawing elements. By altering the x and y coordinates of both points, as well as altering if it’s going uphill or downhill, you can get it to rotate. There will just be a number of sines and cosines involved (read [wikipedia: Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix) for the theory).

However, if you just want to rotate a line, I would make a 1px wide rectangle, or import an SVG line, then you’ll have direct access to the angle property.

---

<div class="post-metadata">

**Author:** ![Bob\_O](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_O](https://forum.inductiveautomation.com/u/Bob_O)\
**Post date:** [March 20, 2020, 1:11pm UTC](https://forum.inductiveautomation.com/t/another-rotation-question/32918/6 "2020-03-20T13:11:25Z")

</div>

Thank you.
