# Dynamic MC arcing

**URL:** <https://forum.kirupa.com/t/dynamic-mc-arcing/157792>\
**Category:** programming\
**Created:** [August 4, 2005, 10:45am UTC](https://forum.kirupa.com/t/dynamic-mc-arcing/157792 "2005-08-04T10:45:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobllama](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bobllama](https://forum.kirupa.com/u/bobllama)\
**Post date:** [August 4, 2005, 10:45am UTC](https://forum.kirupa.com/t/dynamic-mc-arcing/157792/1 "2005-08-04T10:45:26Z")

</div>

As I’ve posted this in about 3 other forums and no one else seems to have an answer for me, I’m hoping you guys might be able to help me out:

I’m adding a game-like element to my site, and it needs a small and (probably) simple little thing that I cannot for the life of me figure out.

I’m trying to create a little “rocket-launcher”-type MC. It “locks-on” to the mouse when the “missle” is loaded and “shoots” towards that point (it doesn’t dynamically follow the mouse, but locks on to the mouseX,Y when it’s generated). That part is a piece of cake. The tricky part is that I want the “missles” to arc (randomly at that) towards their destination point.

I’ve had no problems getting the missles to reach their destination in a straight line, but I’d love it if they could curve towards it. It probably involves lots of trigonometry, which I failed, hence my pleading for help all over teh intarweb.

So, to summarize:

1. Missle is generated  
1a)locks-on to mouseX,Y  
2)missle goes towards endpoint but not directly, in an arc (if possible not a set arc but a random curve so it’s different every time)  
3)missle reaches endpoint, fades out

You guys are probably the most qualified to figure this out for me, I’m not sure why I didn’t ask you first.

Anyhow, plaese please please tell me you have a solution for me.

cheers,  
Bob LLama :puzzled:
