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.

Page Links


Special Pages


Wikis

?

Render Time: 46ms

DB GetPage 6
Generate Html 15
SaveChanges (1) 8
Render Body 0
Render Sidebar 14