Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Tutorial request: Guided Missiles (MGS style).

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
MDave Joined: 17 Dec 2007 Posts: 75 |

Posted: Mon Jun 02, 2008 6:30 pm Post subject: Tutorial request: Guided Missiles (MGS style). |

I'm reaching the limits of my quake c abilities so I've decided to ask for help on how to make guided missiles like the ones seen in metal gear solid (the nikita missiles specifically). Basically, a controllable first person view of a rocket that is constantly moving forwards, slows down to a crawl when turning and slowly speeds up again when not turning the view.
The code I have is a mess/hacky and dosn't work, so I'd rather start off on a good foot
I think it would be a pretty fun weapon
- Thanks for reading.

Back to top |

Orion Joined: 12 Jan 2007 Posts: 414 Location: Brazil |

Posted: Tue Jun 03, 2008 5:20 pm Post subject: |

ftp.gamers.org/pub/idgames2/quakec/weapons/guidemis.zip It's a mod from another guy, qc files are included, you can give'em a read! If you see the files you'll notice that it should do some hacks, I don't understand that changing point of view thing very well... But notice that it copies every player's stats...
_________________
There's no signature here. Stop looking for one.

Back to top |

xaGe Joined: 01 Mar 2006 Posts: 329 Location: Upstate, New York |

Posted: Tue Jun 03, 2008 6:52 pm Post subject: |

ftp://archives.gamers.org/pub/idgames2/quakec/weapons/guidemis.txt ftp://archives.gamers.org/pub/idgames2/quakec/weapons/guidemis.zip

Back to top |

MDave Joined: 17 Dec 2007 Posts: 75 |

Posted: Tue Jun 03, 2008 7:54 pm Post subject: |

Thanks a bunch! I promise I'll show the fruits of my labour after I've finished a demo up

Back to top |

Wazat Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA |

Posted: Wed Jun 04, 2008 5:25 pm Post subject: |

For those of you who have played Super Smash Bros Brawl, Snake's missile launcher is similar to what he wants (but he wants a first person view). The missile travels rather fast unless it's turning, in which case it travels quite slowly. MDave: To do the "slowing down during a turn" thing, simply keep track of your last orientation and watch for differences:
*If you track angles, you can do an angle comparison to see if you've turned more than a certain threshold and slow yourself down.
*If you track a direction instead of angles you can do a dot product (which is easier than angle compare imo) by multiplying the current direction and the old direction (make sure both are normalized). The result is a number from -1 to 1, where -1 means they're opposite, 0 means they're perpendicular, and 1 means they're exactly the same. A threshold of 0.95 or so ought to do.
Example:

Code:
// check if I'm turning dot = self.mangle * self.v_angle; if(dot < 0.95) // if I've turned too much { // slow me down
}
// track last angle
self.mangle = self.v_angle;

Hope that helps.
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.

Back to top |

MDave Joined: 17 Dec 2007 Posts: 75 |

Posted: Fri Jun 06, 2008 12:27 pm Post subject: |

Most helpful, thanks Wazat

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group