hey folks!
i´ve got a little problem withe a projectile which don´t want to move. so here´s my script:
var projectilePrefab:Transform;
function Update()
{
if(Input.GetKey("f"))
{
var projectile = Instantiate(projectilePrefab, GameObject.Find("SpawnPoint").transform.position, transform.rotation)
Instantiate(projectilePrefab, GameObject.Find("SpawnPoint2").transform.position, transform.rotation);
//projectile.rigidbody.AddForce(transform.forward) * 2000;
}
}
the projectile mesh spawns, but it dont want to move… why?
i allways get the following error:
spacecraft_controller.js(62,58): BCE0034: Expressions in statements must only be executed for their side-effects.
i know that the projectile.rigidbody.AddForce(transform.forward) * 2000; line produces the error, but where is the fault?
thx for help:)