- Home /
Question by
theUndeadEmo · Sep 14, 2012 at 12:28 PM ·
multiplayerself
Multiplayer, ignore raycast with self but not everyone else
Hi,
trying to make it so that the raycast doesn't hit itself but the other players in game instead.
unfortunately i don't want this effect
if(networkView.isMine){
myTransform= transform;
}
if (Physics.Raycast (myTransform.position, myTransform.right, out hit, 10, mask)) {
if (hit.transform != myTransform){
//do stuff
}
}
i need the way ignoreRaycast Layer works but still make it colidable with other players in the network
Comment
you must use the physics laters system. fortunately it is very easily and well documented on Unity.
in fact, you ALWAYS have to use it, in practic e- you would never not use it
Your answer
![](https://koobas.hobune.stream/wayback/20220613081035im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
unity game 1 Answer
How do I use Gamecenter to match-make on iOS? 0 Answers
Building and Running 1 Answer
Why cant I connect to the server? 2 Answers