# Shooting problam

**URL:** https://forum.kirupa.com/t/shooting-problam/64561
**Category:** Uncategorized
**Created:** [September 17, 2004, 2:04pm UTC](https://forum.kirupa.com/t/shooting-problam/64561 "2004-09-17T14:04:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![A\_M\_F](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@A\_M\_F](https://forum.kirupa.com/u/A_M_F)
#### Post date: [September 17, 2004, 2:04pm UTC](https://forum.kirupa.com/t/shooting-problam/64561/1 "2004-09-17T14:04:39Z")

</div>

How can I do, that when I press on any place on my stage, a rocket will come to that place, from a mc?

-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: [September 17, 2004, 4:12pm UTC](https://forum.kirupa.com/t/shooting-problam/64561/2 "2004-09-17T16:12:32Z")

</div>

Man, I didnt understand a thing you said. Just phrase it a little better and I’ll see what I can do.

peace

---

<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: [September 17, 2004, 4:22pm UTC](https://forum.kirupa.com/t/shooting-problam/64561/3 "2004-09-17T16:22:26Z")

</div>

[http://www.purephotoshop.com/article/105](http://www.purephotoshop.com/article/105)

---

<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: [September 17, 2004, 4:47pm UTC](https://forum.kirupa.com/t/shooting-problam/64561/4 "2004-09-17T16:47:23Z")

</div>

> [@joMan](#):
>
> Man, I didnt understand a thing you said. Just phrase it a little better and I’ll see what I can do.
> 
> peace

hahahaha i think what he is trying to say is : lets say he has an mc call “cannon” and a mc called “bullet” how can he make it so that when you click the cannon shoots the bullet to that spot you just clicked

well at least i hope thats wat he meant

---

<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: [September 18, 2004, 7:17am UTC](https://forum.kirupa.com/t/shooting-problam/64561/5 "2004-09-18T07:17:16Z")

</div>

That’s basically what he just stated…

Depending on how you have the cannon and how the camera angle plays into effect… Will help… But you will have to know a little bit of trig to get this to look right my friend… If I wasn’t leaving to get some sleep… I’d post the variales and the functions you’ll need to figure out the lengths and the such…

Well… Actually… Let’s do it this way :

![](http://files.codedaddy.com/cannon_angles.jpg)With the dashed lines… You can get a feel for how you would have to break up the functions… You would take the length of the target area you clicked at… subtract that from the mc’s target location… and then divide that amount by a certain amount… I’d suggest dividing it by 50 or more… To create a more fluent movement… 🙂 Then you can just incremement the rocket ever frame by that said amount… until it hits the target area… 😃

Umm… Sorry I am kind-a vague… I very rarely just hand people code… I just tell you how to do it… In logical thoughts… 😉

---

<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: [September 18, 2004, 5:25pm UTC](https://forum.kirupa.com/t/shooting-problam/64561/6 "2004-09-18T17:25:34Z")

</div>

thanks evety body.  
thanks for replaying but I still, it is not working… :  
here is a link for the shoot I want-  
[http://www.squarecircleco.com/games/cannon/index.html](http://www.squarecircleco.com/games/cannon/index.html)

Can u help me?

-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: [September 18, 2004, 10:45pm UTC](https://forum.kirupa.com/t/shooting-problam/64561/7 "2004-09-18T22:45:57Z")

</div>

I can figure out how to fire ,but I don’t know how to make a cannon rotate as the mouse moves.

```
Example:

[img]http://img.photobucket.com/albums/v419/Commandersa/Ex2.gif[/img]
```
