Func portal orientation: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
Bug:
 Broken in Portal 2. It will rotate existing portals to the specified direction when first enabled, but will not affect newly-placed ones.  [todo tested in ?]
		
	
 (Use new templates, other corrections)  | 
				No edit summary  | 
				||
| (6 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{  | {{LanguageBar}}  | ||
{{this is a|brush entity|name=func_portal_orientation|series=Portal}} It adjusts a portal's rotation to match a specified angle. The "front" of the portal points in the specified direction.  | |||
{{bug|{{portal2}} Broken in Portal 2. It will rotate existing portals to the specified direction when first enabled, but will not affect newly-placed ones.}}  | {{bug|{{portal2}} Broken in Portal 2. It will rotate existing portals to the specified direction when first enabled, but will not affect newly-placed ones.}}  | ||
:{{workaround|Since it still works when first enabled, a {{ent|logic_playerproxy}} can be used to fire an <code>Enable</code> input to the entity every time a portal is placed, which will orient the portals correctly. This can result in some odd behavior when placing portals near the edge of surfaces within the volume, {{ent|func_portal_bumper}}s should be used to prevent this.}}  | :{{workaround|Since it still works when first enabled, a {{ent|logic_playerproxy}} can be used to fire an <code>Enable</code> input to the entity every time a portal is placed, which will orient the portals correctly. This can result in some odd behavior when placing portals near the edge of surfaces within the volume, {{ent|func_portal_bumper}}s should be used to prevent this.}}  | ||
== Keyvalues ==  | == Keyvalues ==  | ||
{{KV Targetname}}  | |||
{{KV|Angles to face|intn=AnglesToFace|angle|The angles to rotate portals to.{{tip|An easy way to figure out what to set this to is to place a {{ent|prop_portal}}, rotate it to the desired orientation, then look at its angles.}}}}  | {{KV|Angles to face|intn=AnglesToFace|angle|The angles to rotate portals to.{{tip|An easy way to figure out what to set this to is to place a {{ent|prop_portal}}, rotate it to the desired orientation, then look at its angles.}}}}  | ||
{{KV|Match linked angles.|intn=MatchLinkedAngles|boolean|If set, portals placed in this volume will have their angles match their linked portals. This only works for floor or ceiling portals with a currently linked partner that is on a surface with the same orientation. {{todo|Seems to be broken in P1? It does work in P2 if the workaround is used.}}}}  | {{KV|Match linked angles.|intn=MatchLinkedAngles|boolean|If set, portals placed in this volume will have their angles match their linked portals. This only works for floor or ceiling portals with a currently linked partner that is on a surface with the same orientation. {{todo|Seems to be broken in P1? It does work in P2 if the workaround is used.}}}}  | ||
{{KV EnableDisable}}  | {{KV EnableDisable}}  | ||
== Inputs ==  | == Inputs ==  | ||
{{I EnableDisable}}  | {{I EnableDisable}}  | ||
Latest revision as of 13:08, 25 September 2024
func_portal_orientation  is a   brush entity  available in 
 Portal series. It adjusts a portal's rotation to match a specified angle. The "front" of the portal points in the specified direction.
Workaround:Since it still works when first enabled, a logic_playerproxy can be used to fire an Enableinput to the entity every time a portal is placed, which will orient the portals correctly. This can result in some odd behavior when placing portals near the edge of surfaces within the volume, func_portal_bumpers should be used to prevent this.
Keyvalues
- Name (targetname) <string>[ Edit ]
 - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. 
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities 
- Angles to face (AnglesToFace) <angle>
 - The angles to rotate portals to.
Tip:An easy way to figure out what to set this to is to place a prop_portal, rotate it to the desired orientation, then look at its angles. 
- Match linked angles. (MatchLinkedAngles) <boolean>
 - If set, portals placed in this volume will have their angles match their linked portals. This only works for floor or ceiling portals with a currently linked partner that is on a surface with the same orientation. Todo: Seems to be broken in P1? It does work in P2 if the workaround is used.
 
- Start Disabled (StartDisabled) <boolean>
 - Stay dormant until activated (with the
Enableinput). 
Inputs
EnableDisable:
- Enable / Disable
 - Enable/disable this entity from performing its task. It might also disappear from view.