# Scripted curve movements

**URL:** <https://forum.kirupa.com/t/scripted-curve-movements/35303>\
**Category:** Uncategorized\
**Created:** [November 12, 2003, 3:19pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303 "2003-11-12T15:19:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikane\_marshal](https://avatars.discourse-cdn.com/v4/letter/i/b9bd4f/32.png) [@ikane\_marshal](https://forum.kirupa.com/u/ikane_marshal)\
**Post date:** [November 12, 2003, 3:19pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/1 "2003-11-12T15:19:01Z")

</div>

Have been trying to script curved movement whereby a random point is chosen on the stage and a mc (movie clip) moves towards it following a curved path  
played around a bit and found that i couldnt quite grasp the math since it has been an age since i looked worked with my geometry  
is there a tutorial i havent looked at or a site where i can find some reference material on the math behind this kind of move ment  
would aprreciate the help a great deal

Thanks

---

<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 12, 2003, 3:41pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/2 "2003-11-12T15:41:34Z")

</div>

You want the script or the how to do it

Curved motion = (X_X)+(Y_Y) = Constant

Or set the y position as a function of the X postion through Sin / Cos of the angle between them and the horizontal / vertical.

Rmember this will return radians where pi/2 = 180 degrees (i think)

---

<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 12, 2003, 3:44pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/3 "2003-11-12T15:44:35Z")

</div>

You want a perfectly circle movement ? Or some other type of movement ?

---

<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 12, 2003, 5:17pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/4 "2003-11-12T17:17:56Z")

</div>

[http://www.kirupa.com/developer/mx/circular.htm](http://www.kirupa.com/developer/mx/circular.htm)

---

<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 13, 2003, 10:01am UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/5 "2003-11-13T10:01:39Z")

</div>

sorry was away for a while while all these replies came in. Basically what i was trying was that the mc moves snakelike towrads the chosen point.  
Since the object is varying on both its \_x and \_y as it does this what is the trig function i can use

---

<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 13, 2003, 12:20pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/6 "2003-11-13T12:20:07Z")

</div>

Sin and cos 🙂 there’s a trig tute…

---

<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 13, 2003, 12:41pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/7 "2003-11-13T12:41:41Z")

</div>

Be nice else i’ll Tan yo \*\*\*.

Hehehehehe Trig humor \< bet you never thought you see that in your lifetime or want to see it either!

---

<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 13, 2003, 12:48pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/8 "2003-11-13T12:48:22Z")

</div>

Trig 101

[http://math.about.com/gi/dynamic/offsite.htm?site=http%3A%2F%2Fwww.physics.uoguelph.ca%2Ftutorials%2Ftrig%2Ftrigonom.html](http://math.about.com/gi/dynamic/offsite.htm?site=http%3A%2F%2Fwww.physics.uoguelph.ca%2Ftutorials%2Ftrig%2Ftrigonom.html)

---

<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 13, 2003, 2:54pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/9 "2003-11-13T14:54:26Z")

</div>

asante sana  
(swahili for thanks)

---

<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 13, 2003, 3:02pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/10 "2003-11-13T15:02:45Z")

</div>

no problem

(English for hakuna matata)

---

<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 13, 2003, 4:51pm UTC](https://forum.kirupa.com/t/scripted-curve-movements/35303/11 "2003-11-13T16:51:55Z")

</div>

😛
