Quantcast
Channel: Questions in topic: "ignorecollision"
Viewing all articles
Browse latest Browse all 148

Ignore Layer Collision

$
0
0
-Hi guys, I am trying to make a multiplayer game. I have particle effects to fire. I spawn particle effects from inside of player. I also have two layers named "LocalPlayer" and "RemotePlayer". But i have an issue. -I am using "IgnoreLayerCollision" code to stop colliding the collision between Particle effect and Player so i can spawn particle effect from inside of player. -Firstly, i stopped the collision between Local player and particle effect and then i stopped the collision between Remote player and particle effect. -But i encountered an issue. The issue is this; After i built game, On built version, when i fire particle effect, it succesfully gets spawned from local player but on unity's side the local player is being remote player and it is not colliding the other players. -The thing that i am trying to do is; particle effect won't collide the player it gets spawn but others. I hope you understand me when you watch the video that i am sharing with you. If you help me, i will be overjoyed. Thanks. -https://www.youtube.com/watch?v=ZKyuTSkgW9I&feature=youtu.be -This is the code i am using; public void IgnoringCollision() { if (isLocalPlayer) { Physics.IgnoreLayerCollision(9, 12); } else { Physics.IgnoreLayerCollision(10, 12); } }

Viewing all articles
Browse latest Browse all 148

Trending Articles



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