SetFlyThroughWindscreenParams parameters not working when hitting vehicles

Issue:
Regardless of the parameters passed to the SetFlyThroughWindscreenParams native it will only affect peds, world objects, etc… but not other vehicles. For example, if I set all the parameters to 0.0 I should always fly through the windscreen, but this only happens when colliding with everything but vehicles. Here is a video of what happens when colliding with other cars, I have another video of me colliding with world objects in the “Expected result” section.

Client: Canary b3095
FXServer: b8139

Expected result:
When hitting vehicles you fly out based on the parameters provided within the native, just like when hitting peds or world objects. Example video provided below of me hitting world objects to show expected result when hitting vehicles with all parameters set to 0.0.

Reproduction steps:

  1. Use the following snippet:
RegisterCommand('repro-windscreen', function()
    SetFlyThroughWindscreenParams(0.0, 0.0, 0.0, 0.0)
    SetPedConfigFlag(PlayerPedId(), 32, true)
end)
  1. Once you have spawned in (to ensure the config flag gets set on your ped) run the command /repro-windscreen.
  2. Hit any vehicle within traffic at low speeds.
1 Like

I experienced something while testing this with @Manason: I think this currently works if you hit another car directly in the front or rear bumper.

It has to be almost perfectly head-on, and if the vehicle has a rambar (like trophytruck) or other add-on/part it seems to require deformation of the model to a certain level to trigger, maybe because of the rambar/props the hitbox of the vehicle is protected and this doesn’t trigger even when hitting peds when the native is set like:

SetFlyThroughWindscreenParams(0.0, 0.0, 0.0, 0.0)

I have unfortunately had no luck with getting it to work like this, I spent a while crashing into different vehicles driving multiple different ones myself too, I have gotten myself to fly through the windscreen sometimes but this includes hitting the sides of vehicles too. Vehicles just don’t seem to have the same consistency as objects or peds.

I have no issues with peds, I get the expected results 100% of the time.


I have no issues with peds, I get the expected results 100% of the time.

Try it with a trophytruck (the spawn name), it (at least for me) did not trigger unless I had damaged the front of the car enough.

It appears to work okay with both trophytruck and trophytruck2

Hmm, I have no idea then; I’m not sure what would cause this to behave differently.