user406009
user406009

Reputation:

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, if possible.

Upvotes: 0

Views: 407

Answers (1)

Macke
Macke

Reputation: 25700

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?

Upvotes: 4

Related Questions