请问老师要怎么同步,子弹是按照教程服务器发出的,下面脚本挂在子弹上,在本地都看的到自己子弹打中的效果,但是对方打出的子弹很大几率看不到命中效果,需要做同步吗?怎么做?
private void OnCollisionEnter(Collision collision)
{
GameObject hit = collision.gameObject;
Health health = hit.GetComponent<Health>();
if (health != null)
{
health.TakeDamage(10);
}
AudioSource.PlayClipAtPoint(bulletAudio, transform.position);
GameObject.Instantiate(BulletBoom, transform.position, transform.rotation);
Destroy(this.gameObject);
}