Instantiate doesn't work properly with photonView.isMine?
Options
zigglr
✭
I have this script which instantiates a bubble when the player clicks, and then follows them
if (photonView.isMine) {
if (Input.GetMouseButton(0))
{
//Sends out a raycast here but i'll miss out that part
PhotonNetwork.Instantiate(bubbleprefabname, transform.position, transform.rotation, 0);
}
When this bubble is instantiated, it shows up on the player's screen as following them, however if you look at another player's screen, the bubble is following this player,, and not the player that instantiated it.
Any help?
Thanks
if (photonView.isMine) {
if (Input.GetMouseButton(0))
{
//Sends out a raycast here but i'll miss out that part
PhotonNetwork.Instantiate(bubbleprefabname, transform.position, transform.rotation, 0);
}
When this bubble is instantiated, it shows up on the player's screen as following them, however if you look at another player's screen, the bubble is following this player,, and not the player that instantiated it.
Any help?
Thanks
0
Comments
-
If you network instantiate a bubble, it has a PhotonView.
On that, check the owner, to find which player it has to follow.
0