I cannot make glass break no matter what I try

GTA San Andreas and GTA Vice City discussion.

Moderator: Oleg

based_matt
Posts: 5
Joined: Wed Feb 24, 2021 10:02 am

I cannot make glass break no matter what I try

Post by based_matt »

I have set both the vehglass material and the collisions of each window to have the "Crash" user defined property, i have given the surrounding chassis collision areas the "No-hit test area" ID to ensure that bullets are able to be shot through the window. I have assigned See-Through and Shot-Through FX attributes in polygon mode on the window collisions in GTA Properties. I would really appreciate any suggestions or things to check out regarding whats going on with my windows. :(
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: I cannot make glass break no matter what I try

Post by Oleg »

do bullets pass through the glass or you can hear the glass hit sound fx?

if bullets are passing through collision volume, then some collision volume on your model is incorrect. refine its shape in both "Damage" mode an in default mode (press Damage button and refine points positions so geometry does not turn inside out).

In some cases it could be a good choice to clone geometry object of chassis COL, set properties Mesh->vertices->format to have "Deformable" on one of them and toggle it off for another object. Then group both geometries and convert them to COL compound. This is a so-called "double collision" trick, it helps to solve collision problems.

Regarding the scenario when bullets DO hit the glass and you can see/hear a proper FX, you will need to adjust windscreen or window objects as follows:
1. object should have 2 uv channels
2. each object should have arbitrary layout / uv mapping created for uV channel #2. no matter how you map it, which texture or which area, just make sure glass is mapped into texture's square in uv mapper and occupy proportional space (do not stretch windscreen wider/narrower, it should retain vertical-to-horizontal proportions on UV#2).
3. you need a L1 geometry for your vehicle and especially for glass/window objects. The game draws L1 when glass is broken.
based_matt
Posts: 5
Joined: Wed Feb 24, 2021 10:02 am

Re: I cannot make glass break no matter what I try

Post by based_matt »

Windows not having a L1 was what my problem was. Thanks Oleg!
Post Reply