dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: math problem

  1. #1
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I imagine Kusco will be able to answer this.

    Working on a little game and want to make an object collide with moving object.

    object 1 is moving left on x axis
    Object 2 is moving right on x axis

    how can I plot object 2 so that it will collide with object 1?

    too hard, maybe there is an easier way. What I'm doing is a math practice game for my daughter and when she enters the correct answer I want the ship to shoot and HIT the correct problem.


  2. #2
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    Hi Bret,

    This is fairly easy to answer. I've put a movie together to help explain. Here's the link...

    http://www.syssoft.net.au/3dfa/homing_missile.html

    One thing to keep in mind is that the speed of the missile needs to exceed the speed of the target otherwise the missile is most likely going to miss.

    The movie makes use of some javascript code which can easily be converted to Action Script. The code runs at 60 times per second and the movie's frame rate is set to 30fps. This allows for a smoother demo

    HTH,
    Kusco

    PS. About that link to my site, it's coming soon. Within the next few days I'll post it here.
    I would also like to put a link to your site, Jason's, MrJoseph's and anyone-else's site too. If anyone has a link that they would like posted please let me know.



  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Originally posted by kusco
    Hi Bret,

    This is fairly easy to answer. I've put a movie together to help explain. Here's the link...
    knew you'd be the one.....


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center