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

Client raycast not working

$
0
0
Hey,

Ran into a weird problem while testing out my shooting function in 2D game. Apparently only the servers host has a working raycast + only the host is able to deal damage (because of the working raycast). Meanwhile the clients raycast is all bonkers. Any idea what is causing this?

This is the script handling the shooting.
Code (CSharp):
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.Networking;
  4.  
  5. public class Shoot : NetworkBehaviour {
  6.  
  7.     public int dmg = 1;...
Client raycast not working

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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