Bullets in BulletPhysics
What would be the best way to simulate bullets in bulletphysics?
Small capsule bodies? Some sort of ray tracing? Something else?
Some example code would be nice,开发者_Python百科 if possible.
For bullets that travel 300 m/s or more, ray tracing is probably the simplest way unless you need gravity. Then linearizing the path into parts and do line-based checking might be away forward.
Small capsules (or spheres) might work too, if the collision detector is configured to take speed into account. (Not sure if it's in by default). But I'd guess you don't need that kind of fidelity for your hit calculations, or?
精彩评论