Garry's Mod Wiki

util.DecalEx

  util.DecalEx( IMaterial material, Entity ent, Vector position, Vector normal, table color, number w, number h )

Description

Performs a trace and paints a decal to the surface hit.

This function has trouble spanning across multiple brushes on the map.

Arguments

1 IMaterial material
The name of the decal to paint. Can be retrieved with util.DecalMaterial.
2 Entity ent
The entity to apply the decal to
3 Vector position
The position of the decal.
4 Vector normal
The direction of the decal.
5 table color
The color of the decal. Uses the Color.

This only works when used on a brush model and only if the decal material has set $vertexcolor to 1.

6 number w
The width scale of the decal.
7 number h
The height scale of the decal.