Okay this is a bit difficult to explain,
But I've got two issues happening in this scene.
I have two viewports, one for player 1 and one for player 2.
Within each player, I have a reticle that follows player 1 and only shows in player 2's viewport.
And a reticle that follows player 2, but only shows in Player 1's viewport.
My first issue is: Player 1's reticle follows player 2, but player 2's reticle does not follow
player one. However player 2's reticle follows itself, I have made sure that Player 2's
reticle is in fact linked to Player 1's ship.
![Issue1][1]
My second issue is, when Player 1 fly's by Player 2, the reticle dissappears off the side of
the screen, which is what I would like. However, if you fly a large distance between and still
facing away from player 2, the reticle appears back on screen again, even though the enemy is
behind the player.
![Issue2][2]
The reticle follow script is pretty simple,
public var Target:Transform;
function Update () {
transform.position = Camera.main.WorldToViewportPoint(Target.position);
}
The script is applied to two reticles one for player 1, and one for player 2.
- Sythen.
[1]: http://scottbaker.eu/Issue1.jpg
[2]: http://scottbaker.eu/Issue2.jpg
↧