Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

How to syn shoot effect in survival shooter by UNet

$
0
0
I'm trying convert the survival shooter to multiplayer version by UNet introduced in Unity5.x, the new network system. But I encountered a problem when spawning the GunBarrelEnd effect(shoot effect) to the client. The code is something like this:
[Command]
void CmdShoot ()
{
Transform gbe = transform.Find ("GunBarrelEnd");
timer = 0;
bullet = (GameObject)Instantiate (bulletPrefab,gbe.position,Quaternion.Euler(0,0,0));

bullet.GetComponent<Bullet> ().Shoot (gbe);
Destroy (bullet, 1.0f);...

How to syn shoot effect in survival shooter by UNet

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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