Title says…
lol wut
How long is a piece of string?
Coke or pepsi?
this is a very broad and open-ended question to which there are a million answers
Define “balanced gameplay”.
Projectiles are good if you want weapons to be dodgeable. I haven’t tried setting up realistic bullet physics before, but I imagine that it would be easier to accomplish using projectiles. You do have to be aware of the speed at which the object is going. If it’s too fast than it might end up going through some objects, so you have to set up something to detect for that or work around it.
Hitscan/raycast weapons are good for imitating fast projectiles and you don’t have to worry about them passing through objects but as I said, you’re probably better off going with projectiles if you want to simulate realistic bullet physics. Be aware if you’re enemies are using raycast weapons, deaths may feel cheap because of the instant damage and no chance to defend against them.
Well with the Projectile part, according to Unity Reference, if you change the projectiles rigidbody to Continuous checking instead of discreet it will detect any collision, but in so doing that, you take a lot more Physics Calculations away from more important things if they are needed.
This is broken in unity 4.x
apparently fixed in unity 5.
I’m in need of this eature right now, and very upset about this.
My solution for Unity 4 is saving the projectiles last position and then next frame do a raycast from the last position to it’s current position.
Yeah, I do the same. Works great!
Hmm didn’t realize that, I used it a few times in my prototype games in 4X series and it just made my game spike with frame lag. But I’ll definitely be sure to try it again in the 5X Series when I get that far into my game in 5X.
Hitscan are easier to write hacks for. Projectile are harder to do so, while also requiring more skill/experience from player. In pvp I wouldn’t mind if the game tuned down the importance of hitscan weapons and rewarded projectile more. But that’s a rare sight. I think basically only Tribes has done that.
Raycast based on trajectory formula! Realastic behaviour and probably cheaper than collider + rigidbody.