User Tag List

Results 1 to 7 of 7

Thread: Help lobbing a projectile

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Help lobbing a projectile

    I am trying to make a side scroller where the player controls a ship and a cursor and can lob projectiles at the cursor's position from the ship. The problem is I can't figure out how to make the projectile pass through the cursor's position. I need the lobbed object to arc upward and then downward through the cursor's position (stored position where the cursor was when the projectile was fired). I am really bad at understanding the math involved and can't figure out a good way of faking this. Can anyone offer an example or a good place to look for info?

    Thanks in advance,

    Mobichan

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help lobbing a projectile

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=66374#Post66374

    You need to learn Bezier curves.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Help lobbing a projectile

    So, I originally tried using Move By bezier to do this, but the problem is I don't want the projectile to stop when it reaches the target point. I want it to continue to fall offscreen. So this means the target point is actually on the curve, not the end point of the curve.

    Any idea how I would do this?

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Help lobbing a projectile

    Wow, now that I have gone through the article and gotten it working, I guess the answer is to just keep increasing the t variable until the object is offscreen. Beziers are really not that hard after all.


  5. #5
    No Products Registered

    Join Date
    Oct 2009
    Location
    California US
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help lobbing a projectile

    That works, but using pinball movement, and doing:
    (Example)
    Player presses space bar - create object (diamond-like thing with the star) at 0,0 from player's ship AND add set the projectile's direction to (select your direction). Then tinker with the gravity. This should work, it has worked form me. The other way sounds a bit too complicated.

  6. #6
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Help lobbing a projectile

    I just put an example of that on my website. Shoot Up Example.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Help lobbing a projectile

    Thanks for the suggestions guys, but Beziers did the trick and they are dead on accurate.

Similar Threads

  1. best way for handling non projectile weapons (like a sword) in a platformer game.
    By MonDieu72 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd December 2013, 03:55 PM
  2. Launching a Projectile: Button Press works, Mouse Click does not
    By tgftw in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 11th December 2013, 09:06 AM
  3. issue with dublicate projectile with 360 degree side shooting game, please help
    By MTFNoobik in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd July 2012, 11:03 AM
  4. Beam Projectile?
    By Pixzel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th August 2010, 11:02 PM
  5. Targeted projectile flying a curve
    By Random in forum File Archive
    Replies: 9
    Last Post: 7th January 2009, 02:46 PM

Posting Permissions

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