Hi,
I have assumed the same method of attaching a particle system to the Player Ship, as another student on here. I used a Script on the particle system. What this does is ensure the transforms are directly over each other. However, if I try to say, set a Vector 3 startPosition = New Vector 3 (0, -4, 0) and put start postion in place of the playership.transform position, then I get an error.
I feel my logic is on the right path, but I am missing something fundamental here. Please help!!!
The script below doesn’t display any attempt to do this, so this code currently plops the sets the particle system as directly the same as the player ship.
private PlayerController playerShip;
private Vector3 shipPosition;
// Use this for initialization
void Start () {
playerShip = GameObject.FindObjectOfType<PlayerController> ();
}
// Update is called once per frame
void Update () {
GetThrusterPosition ();
}
void GetThrusterPosition(){
shipPosition = new Vector3 (playerShip.transform.position.x, playerShip.transform.position.y);
//shipPosition = playership.transform.position
this.transform.position = shipPosition;
}
}