Hello,
this time i want to make a little jump and run game for the iphone.
I can run with a character, with the CameraRelativeControl. I do a shot whith cloning the patrone prefab like made in Tutorial “Star Trooper”.
When the character is standing still everything is fine but when he`s running… i cant see the cloned shoot and also no trail of its self?
What can i do, here is my script:
var player : GameObject;
var patrone : GameObject;
function Update () {
if (Input.GetMouseButtonDown (0))
{
var currentPlayerPos = player.transform.position;
var position : Vector3 = new Vector3(currentPlayerPos.x, currentPlayerPos.y+0.5, currentPlayerPos.z);
var thisPatrone : GameObject = Instantiate (patrone, position, Quaternion.identity) as GameObject;
Physics.IgnoreCollision(thisPatrone.collider, collider);
//Debug.Log(currentPlayerPos);
thisPatrone.rigidbody.AddForce (transform.TransformDirection (Vector3.forward) * 100);
}
}