I have set up a physical bullet.
It’s fast, because it travels at (eye estimate ) 100m/sec.
Collision detection is set as continuous dynamic.
It’s working well enough but the collision with terrain occasionally fails.
I raised the physics iterations count up to 30 but it doesn’t solve the problem (and probably this value is far too high and I’ll have to lower it down again).
Any idea?
I was using rigidbody.velocity, taking bullets from a pool. However, I just learned that a better method, mostly in efficiency, but most likely, also in collision accuracy, is to use a ray.
http://forum.unity3d.com/search.php?searchid=1539229
You mean a raycast?
Unfortunately I can’t use that.
It’s for a shell of a tank, so I can’t use a direct hit like it was a gun bullet.
There’s one second or se before it hits the target.
The thread link is dead?
Hm.
I would say, you could still use a ray but just put a delay related to distance to register any type of damage.
http://forum.unity3d.com/threads/181023-Best-Bullet-Fire-Method
Yes, definitely raycast. Move the bullet each frame then raycast (or sphere cast if your shell is big enough) from the previous position to the new position. If you hit something along the way, use the RaycastHit result to get the exact position to spawn effects at.
This is much more reliable than regular physics for fast moving projectiles.