prop_mirror
prop_mirror
is a point entity available in Portal 2. It creates a square portal that mimics a mirror and which cannot be travelled through.
Note:The model won't be displayed if it doesn't have a
MirrorSurface
bodygroup.Note:Any model can be specified if you simply want the mirror funtionality; the model will not show and you will be left with a very simple mirror projection. It is recommended if you do this to use the
anim_wp/angle_helper/angle_helper.mdl
model, as you can see the orientation and the exact position of the center of the mirror.Bug:This entity does not work properly in multiple Visleafs. Objects pop in and out of view, and sometimes the whole portal goes white.
Workaround:Place a brush flush to the room dimensions and tie it to a
[todo tested in?]func_viscluster
. If this fails, setting the cvar r_ClipAreaFrustums 0
appears to fix this fully, although it's unknown what side effects this might have.Keyvalues
- Width
([todo internal name (i)])
<float> - The width of the mirror when there's no model
- Height
([todo internal name (i)])
<float> - The height of the mirror when there's no model
- Physics
([todo internal name (i)])
<boolean> - Move physically
Confirm:What does this do? Is it needed if the mirror has a parent? Does it enables physics similar to
prop_physics
?Studiomodel:
- World Model
(model)
<string> - The model this entity should appear as. 128-character limit.
- Skin
(skin)
<integer> - Some models have multiple skins. This value selects from the index, starting with 0. Tip:Hammer's model browser automatically updates this value if you use it to view different skins.
- Model Scale
(modelscale)
<float> (in all games since ) (also in ) - A multiplier for the size of the model.
- Tip:In Hammer++ with a prop selected in 3D view, hold Ctrl and scroll the mouse wheel to change the modelscale in increments of 0.5. Holding ⇧ Shift will scale it in smaller increments of 0.05.
- Bodygroup
(body / SetBodyGroup)
<integer> - Some models have multiple submodels. This value selects from the index, starting with 0. May be overridden by animations and/or game code. Note:If both
body
andSetBodyGroup
are present (even if set to 0),body
will be prioritized.
- Sequence
(sequence)
<integer> !FGD - Default animation sequence for the model to be playing after spawning. May be overridden by game code.
- Lighting Origin
(lightingorigin)
<targetname> - Select an entity (not
info_lighting
!) from which to sample lighting instead of the entity's origin or $illumposition.
Shadow:
- Disable Shadows
(disableshadows)
<boolean> - Prevents the entity from creating cheap render-to-texture shadows, or lightmap shadows if the entity is a prop_static. Does not affect shadow mapping.
- Disable Receiving Shadows
(disablereceiveshadows)
<boolean> - Prevent the entity from receiving dynamic shadows on itself.
- Shadow Cast Distance
(shadowcastdist)
<integer> !FGD - Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity.
- Disable Shadow Depth
(disableshadowdepth)
<boolean> (in all games since ) - Used to disable rendering into shadow depth (for projected textures) for this entity.
- Disable flashlight
(disableflashlight)
<boolean> (in all games since ) - Used to disable projected texture lighting and shadows on this entity.
- Projected Texture Cache
(shadowdepthnocache)
<integer choices> (in all games since ) - Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
|
- Render in Fast Reflections
(drawinfastreflection)
<boolean> (in all games since ) - If enabled, this entity will render in fast water reflections (i.e. when a water material specifies
$reflectonlymarkedentities
) and in the world impostor pass.
Parentname:
- Parent
(parentname)
<targetname> - Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
- Pitch Yaw Roll (Y Z X)
(angles)
<angle> - This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
- Name
(targetname)
<string> - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
Studiomodel:
SetBodyGroup
<integer>- Set the model's body group.
AlternativeSorting
<boolean>- Uses an alternative method for telling which objects are in front of others. Use if this object draws incorrectly when seen through transparent things.
SetModelScale
<string> (in all games since ) (also in )- Sets the model scale. Takes two values separated by a space. The first is the target model scale. The second value is the number of seconds the change in scale will be spread over. If there is no second value, the model will scale instantly. Warning:Negative or extremely high values can cause crashes!
Shadow:
DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying
EF_NOSHADOW
.
EnableShadow
- Turn dynamic shadows on for this entity.
DisableReceivingFlashlight
(in all games since )- This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight
(in all games since )- This object may receive light or shadows from projected textures.
Reflection:
DisableDrawInFastReflection
(in all games since )- Turns off rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
EnableDrawInFastReflection
(in all games since )- Turn on rendering of this entity in reflections when using
$reflectonlymarkedentities
in water material.
ToggleDraw:
DisableDraw
(in all games since )- Add the EF_NODRAW flag to this entity. Some entities manage this on their own so be aware you can override that value.
Parentname:
SetParent
<string>- Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment
<string>- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
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 the the movement hierarchy, leaving it free to move independently.
Outputs
Studiomodel:
OnIgnite
- Fired when this object catches fire.