Hi to all,
How I can create a cube, which begins at "point A" and end at "point B "?
Is to create a wake of shooting . THANKS IN ADVANCE!

Hi to all,
How I can create a cube, which begins at "point A" and end at "point B "?
Is to create a wake of shooting . THANKS IN ADVANCE!

Something like this:
public var pA:Vector3;
public var pB:Vector3;
function Start()
{
// Assuming this is run on a unit cube.
var between:Vector3 = pB - pA;
var distance:float = between.magnitude;
transform.localScale.x = distance;
transform.position = pA + (between / 2.0);
transform.LookAt(pB);
}
var MyCube:GameObject;
function Start() {
Instantiate (MyCube, Vector3(0,0,0), Quaternion.identity); //Change the vector 3 to the position you want.
}
And look at this http://unity3d.com/support/documentation/ScriptReference/Object.Instantiate.html
Maybe take a look at this: