Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

How to fire a weapon?

$
0
0
Hi,

I have a prefab of my player with PhotonView component and in his bone hierarchy I have a gun attached to the spine_02. The gun has a RifleManager.cs script added to control all the gun functions and properties. The player shoots the gun with a script attached (PlayerShoot.cs), but the shooting function is in the RifleManager.cs (called from the PlayerShoot.cs script). A Projectile is spawned. I want to make it spawned in network. Do I need to add another PhotonView component to the gun attached to the player? I think, I don't. How to do that in Photon?

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>