# Rotation around simulated registration point?

**URL:** <https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336>\
**Category:** Uncategorized\
**Created:** [October 31, 2003, 4:39pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336 "2003-10-31T16:39:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spankevelli](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@Spankevelli](https://forum.kirupa.com/u/Spankevelli)\
**Post date:** [October 31, 2003, 4:39pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/1 "2003-10-31T16:39:42Z")

</div>

Hi, I want to have arm movement such as the forearm rotating about the arm where the elbow should be the problem is the registration point is at the shoulder for arm. I want the forearms registration to be constantly equal to a simulated registration point where the elbow should be as the arms registration point would be at the shoulder. I need to do it WITHOUT NESTING(a movieclip within another) is it possible.

i tried useing a constant distant between the two clips but it doesnt work. dont know I I have to use trigonometry or not

_I’m actually trying to do this in Director,so nesting wouldnt work_

I think in brief what I trying to accomplish is  
onEnterFrame=function(){

arm.\_x=shoulder.\_x  
arm.\_y=shoulder.\_y

------------------problem----------------------------------  
arm.\_x=simulated\_x(where elbow would be)  
arm.\_y=simulated\_y(where elbow would be)  
}

Thanx, sorry for any spelling mistakes

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 5:12pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/2 "2003-10-31T17:12:08Z")

</div>

You need something like

[AS]  
UpperArmAngle = xxx \* Math.PI / 180; // xxx in degrees  
UpperArmLength = yyy;

ElbowX = Math.sin(UpperArmAngle) \* UpperArmLength + shoulder.\_x;  
ElbowY = -Math.cos(UpperArmAngle) \* UpperArmLength + shoulder.\_y;  
[/AS]

Hope that helps.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 6:08pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/3 "2003-10-31T18:08:59Z")

</div>

yup, check your basic trigonometry formulas (ie what are the coordinates of a point on a circle (cos(x),sin(x)) =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 31, 2003, 9:29pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/4 "2003-10-31T21:29:23Z")

</div>

hey I didnt get it to work what I what is the real registration point of the forearm reprsented by green to constantly be attached to the simulated registration point represented as red. If the arm rotates i want the forearms \_x and \_y to constantly be equal to the \_x and \_y of the ‘fake’ registration point. I provided a pic below

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 1, 2003, 8:21pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/5 "2003-11-01T20:21:28Z")

</div>

can’t you do a parent child relationship? make the forearm a child of the arm, and thus, whenever the arm moves, the forearm follows, and when the forearm moves, it moves independently of the arm. Follow? I have no script for you, just the logic. Hope this helps

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 2, 2003, 9:57pm UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/6 "2003-11-02T21:57:30Z")

</div>

Although Hans gave you the answer already, here’s an example. 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 5, 2003, 1:58am UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/7 "2003-11-05T01:58:35Z")

</div>

xactly what i was lookin for

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 5, 2003, 7:11am UTC](https://forum.kirupa.com/t/rotation-around-simulated-registration-point/34336/8 "2003-11-05T07:11:45Z")

</div>

No problem. 😉
