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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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?