env_projectedtexture
From Valve Developer Community
Projecting a colourful texture.
env_projectedtexture is a point entity available in all Orange Box games. It creates a dynamic shadow-mapping light that affects all objects in the world. It is used to create the Episode Two flashlight.
SpotlightTexture input instead.Contents |
Bug fixes
See env_projectedtexture/fixes.
Keyvalues
- target
<string> - The entity will rotate to point at its target, no matter where it is in the world. See also
lightonlytarget.
Bug:Does not work with stock SDK code. See #Fixing targeting. - FOV
<float> - The angle at which the texture is projected. The projection is square, but the texture can make it appear of any shape.
- Remember the default Player FOV is 75°.
- NearZ
<float> - Near Z for projected texture. Default value is 4.0.
- Objects closer than this will not receive the projection.
- FarZ
<float> - Far Z for projected texture. Default value is 750.0.
- Objects beyond this distance will not receive the projection. Think of it as the range limit.
- Enable Shadows
<bool> - Should I cast shadows?
- Shadow Quality
<bool> - Quality of shadows (
To do: what's the difference?)
- Light Only Target
<bool> - Should I light only the entity that is my
target? The world will still be lit. - Light World
<bool> - Should I light the world?
- Camera Space
<bool> - Display relative to player's view. Breaks things horribly unless the entity moves with the player.
- Light Color
<color255> - Tint of projected texture.
Parentname:
- Parent
<targetname> - Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
-
Bug:Does not work with stock SDK code. See #Fixing targeting.
Angles:
- Pitch Yaw Roll (Y Z X)
<angle> - This entity's angular orientation in the world.
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Flags
- Enabled
Inputs
These inputs are accepted by the entity but not known to Hammer:
-
target <string> - Specify a new target entity to point at.
-
cameraspace <bool> - See above keyvalues.
-
LightOnlyTarget <bool> - See above keyvalues.
Bug:Non-functional. -
LightWorld <bool> - See above keyvalues.
Bug:Cannot be re-enabled. -
EnableShadows <bool> - See above keyvalues.
-
Ambient <float> - Allows for an ambiance light, much like the shadow color for it.
-
SpotlightTexture <VTF/string> - A VTF file (not VMT), relative to
/materials.
These inputs are known to Hammer:
-
TurnOn -
TurnOff - Enable or disable the light.
-
FOV <float> - See lightfov keyvalue above.
Parentname:
-
SetParent <targetname> - Move with this entity. See Entity Hierarchy (parenting).
-
SetParentAttachment <string> - Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
-
SetParentAttachmentMaintainOffset <string> - As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
-
ClearParent - Removes this entity from its current movement hierarchy.
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
Outputs
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
