Half-Life: Alyx

Half-Life: Alyx

Not enough ratings
How to create breakable glass with func_shatterglass
By sqr
This guide will walk you through the process of creating a realistic looking glass in HL: Alyx that will break when you shoot at it. Pieces will fall off as you further interact with the broken glass. It will take 5 minutes to create.
   
Award
Favorite
Favorited
Unfavorite
How to create the glass
To create a functional breakable glass you need to follow two simple steps. First creating the surface where the glass will live on the map and then creating the entity that controls the glass settings.

To create the surface, select the Block Tool (Shift+B) and in Geometry Type select Quad. This is extremely important. The glass will only work if your surface is ONE FACE. If you create a block (6 faces) the glass will not work.

Set the surface in the position that you would like your glass to be.

Select your surface and under Object Properties click "Tie Selected Meshes to Entity". It will set your quad as a child of an entity with the Class trigger_multiple. Click on the class name and change it to func_shatterglass. The Object Properties will change and you'll be able to set properties such as glass thickness, if it should have a frame or if the surface is glass or concrete.



Thanks to gvarados and the HL: Alyx Modding Discord[discord.gg] for the help.
5 Comments
BurroBananas Dec 30, 2020 @ 4:37am 
sucks how glass gibs cant interact with glass
弁当, 神の子 Jun 8, 2020 @ 8:19am 
Tick "Legacy Compile Collision Mesh" and then compile.
sqr  [author] Jun 7, 2020 @ 5:25pm 
Met, are you sure that the glass is only 1 face instead of a cube? (6 faces)
[:D met] spook May 23, 2020 @ 12:35pm 
I did exactly that and my glass doesn't work, it doesn't render at all when I test the game but it shows up in Hammer. Any suggestions?
弁当, 神の子 May 18, 2020 @ 6:17pm 
Amazing! Thank you