#After collision everything works fine, but if I want to get/set any of the collider's properties

12 messages · Page 1 of 1 (latest)

fast estuary
#

Basically if I remove
if (collision.gameObject.tag == "Enemy") and everything in the brackets, it works fine.

fast estuary
#

After passing a collision.gameObject to the function, it started working. Seems like passing only collision doesn't work for some reason?

tawdry widget
#

it looks like that effect should just be a normal non-networked (no network identity) prefab, since you destroy it quickly

#

also looks like you are doing damage in a [ClientRPC], health should be controlled by the server and sync'd

fast estuary
tawdry widget
#

you shouldnt need to use a [Command], where you are calling the function currently is serverside so you can do the spawn there (or do what i suggested and have it be a non-networked prefab)

fast estuary
#

When I just copy that stuff over to OnCollisionEnter2D with [ServerCallback], it doesn't work

#

nvm works now

#

thank you!

fast estuary
#

nvm it works, but only on host client, not on other ones

#

and I don't see bullets from other clients