bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Make scene queries squawk when pipelines are disabled

Open ndarilek opened this issue 2 years ago • 1 comments

I spent a long time debugging a situation where I'd turned off physics/query pipelines to spawn everything in a level, tried to move a system that needed the pipeline into that spawning state, and suddenly found my pipeline queries not returning objects they should have. Once I realized my mistake, the solution was obvious. But it took longer than it should have to get to that realization.

Could various QueryPipeline functions possibly log an error, panic, etc. if called when the physics pipeline is disabled? I don't think I care which they do--I just didn't remember that I'd disabled physics for legitimate reasons, and would have appreciated it if the scene queries I'd ran had at least told me they wouldn't do anything, even if only in debug builds.

Not sure if this should be in bevy_rapier or lower in the stack.

Thanks.

ndarilek avatar Jul 13 '22 00:07 ndarilek

Hi! I agree that we could add some warning. A warn log sounds appropriate here instead of a panic.

Not sure if this should be in bevy_rapier or lower in the stack.

Yes, this should be in bevy_rapier.

sebcrozet avatar Jul 17 '22 16:07 sebcrozet