Multiplying Vectors? Multiplying Vector by Rotation?

Unity wont let me do:

GameObject crate = (GameObject)Instantiate(cratePrefab, transform.position + transform.forward * 100, Quaternion.identity);

GameObject crate = (GameObject)Instantiate(cratePrefab, transform.position* transform.forward , Quaternion.identity);

GameObject crate = (GameObject)Instantiate(cratePrefab, transform.position* transform.rotation , Quaternion.identity);

Is there a way to make these work? I’m looking to fire a bullet out of an object and go the direction the objects currently rotated towards?

I get the error:

Assets/Turret.cs(18,120): error CS0019: Operator *' cannot be applied to operands of type UnityEngine.Vector3’ and `double’

or

Assets/Turret.cs(18,99): error CS0019: Operator *' cannot be applied to operands of type UnityEngine.Vector3’ and `UnityEngine.Vector3’

Thanks

You can use Vector3.Scale to scale a vector by another vector:
http://unity3d.com/support/documentation/ScriptReference/Vector3.Scale.html
You can use Vector3.Dot to get the dot product of 2 vectors.
http://unity3d.com/support/documentation/ScriptReference/Vector3.Dot.html
Vector3*float should work. Try transform.forward * 100F
http://unity3d.com/support/documentation/ScriptReference/Vector3.Scale.html

That works fine.

–Eric