This is a general question about networking. Is it cheaper to raycast or create a gameObject projectile? What are the less-obvious benefits for both of them? Thanks!
I am using:
- raycast for gun bullets (invisible projectiles)
- gameObject for rockets (visible projectiles)
The benefits for gameObject is object visibility in scene: in most cases you don’t need to see the bullet trajectory so that you can use raycast; if want to see a rocket traversing a city, have to use gameObject.
As information volume over the network, both are equivalent in cost: hit point for raycast, hit point for gameObject.
But object instantiation requirement make the difference: raycast not require any game object instantiation, so it’s better to use raycats if possible.