Throwing an object on input

I am making a game where the player combines chemicals to make compounds which they use to complete challenges. I have written a code for the combining of the chemicals. I have two global variables, water and HP(Hydrogen peroxide), both made of Hydrogen and Oxygen. I have a problem with one of my scripts- the script that allows the player to “throw” the vial of chemicals.

The input of a key is suppose to send the chemical vial (with Rigidbody) flying in the direction the player is facing (first person). I need variables like speed/power and Rigidbody (for what the vial mesh is). I am decent with JavaScript, but know nothing about C-Sharp. I attempted this code, but I cannot figure out the vector () or any other force related commands. Can someone please try and explain either the Vector () command with examples, How I might approach this problem, or just explain to me how they would do the code?

This is URGENT!!! I need it done by Sunday march 15th 2013.

also, I don’t just want code. If you do give me code, can you explain what you did so I can learn from it?

I am really clueless to how to start this! I have read the Unity page on the Vector command.

-Thanks in advance

Assuming you have a “player” that will be the source of the vial, you could do something like what’s posted below. This will create a vial at the player position (centered) and throw it along the z axis with a force of 1 (vial’s mass will determine how effective this is).

This was all typed in here so there may be some typos, but that is the gist:

if( Input.GetButtonDown("Fire1") )
{
    var temp = Instantiate( nameOfVialPrefab , transform.position , transform.rotation );
    temp.rigidbody.AddForce( 0 , 0 , 1f );
}

Hey, Guys!

Check my asset called Throw Control.