Point viewproxy: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Updated with data from the official portal2.fgd) |
||
Line 2: | Line 2: | ||
==Entity description== | ==Entity description== | ||
A | A camera entity that moves the player's view. Use this if you want the player to retain control of where the player looks but want to base the position to be based on the proxy. | ||
This was used in the intro of the single player campaign in portal 2 to separate the player view geometry from the player collision geometry while still allowing the player to move in the moving room. | This was used in the intro of the single player campaign in portal 2 to separate the player view geometry from the player collision geometry while still allowing the player to move in the moving room. | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV Angles}} | {{KV Angles}} | ||
{{KV| | {{KV Parentname}} | ||
{{KV| | {{KV|Offset type |choices|How the player's view moves to the view of the camera.}} | ||
{{KV|Tilt Fraction|float}} | :* 0 : Snap to camera | ||
{{KV| | :* 1 : Ease to camera | ||
{{KV| | :* 2 : Keep offset | ||
{{KV| | {{KV|Proxy Entity|target_destination|Name of the entity that the camera uses to translate the view.}} | ||
{{KV| | {{KV|Attachment Point|target_destination|Use this attachment on the proxy's parent for position and orientation.}} | ||
{{KV|Tilt Fraction|float|How much the angle of the proxy affects the angle of the view. 0.0 will keep the players view angles unmodified. 1.0 will add in the whole tilt from the proxy.}} | |||
{{KV|Use Fake Acceleration|boolean|If the player maintains an offset from the proxy apply fake acceleration on the player based on the movement of the proxy.}} | |||
{{KV|Skew Acceleration Forward|boolean|If this is set fake acceleration will be more noticeable in the direction of the proxy.}} | |||
{{KV|Acceleration Scalar|float|Multiply the fake acceleration by this ammount.}} | |||
{{KV|Ease Angles To Camera|boolean|Move the player's angles to the camera - this will stop them from looking around.}} | |||
==Flags== | ==Flags== | ||
* | * 4 : Freeze Player | ||
* 32 : Make Player non-solid | |||
==Inputs== | ==Inputs== | ||
{{I Targetname}} | {{I Targetname}} | ||
{{I | {{I Parentname}} | ||
{{IO|Enable|Enable the | {{IO|Enable|Enable the view proxy, and start modifying the player's view.}} | ||
{{IO|Disable|Disable the | {{IO|Disable|Disable the view proxy, and start modifying the player's view.}} | ||
{{IO|TeleportPlayerToProxy|Move the player to the view proxy.}} | |||
==Outputs== | ==Outputs== | ||
{{O Targetname}} | {{O Targetname}} |
Revision as of 02:09, 11 May 2011
Entity description
A camera entity that moves the player's view. Use this if you want the player to retain control of where the player looks but want to base the position to be based on the proxy.
This was used in the intro of the single player campaign in portal 2 to separate the player view geometry from the player collision geometry while still allowing the player to move in the moving room.
Keyvalues
- Name (targetname) <string>[ Edit ]
- 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
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- 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.
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.
- Offset type ([todo internal name (i)]) <choices>
- How the player's view moves to the view of the camera.
- 0 : Snap to camera
- 1 : Ease to camera
- 2 : Keep offset
- Proxy Entity ([todo internal name (i)]) <targetname>
- Name of the entity that the camera uses to translate the view.
- Attachment Point ([todo internal name (i)]) <targetname>
- Use this attachment on the proxy's parent for position and orientation.
- Tilt Fraction ([todo internal name (i)]) <float>
- How much the angle of the proxy affects the angle of the view. 0.0 will keep the players view angles unmodified. 1.0 will add in the whole tilt from the proxy.
- Use Fake Acceleration ([todo internal name (i)]) <boolean>
- If the player maintains an offset from the proxy apply fake acceleration on the player based on the movement of the proxy.
- Skew Acceleration Forward ([todo internal name (i)]) <boolean>
- If this is set fake acceleration will be more noticeable in the direction of the proxy.
- Acceleration Scalar ([todo internal name (i)]) <float>
- Multiply the fake acceleration by this ammount.
- Ease Angles To Camera ([todo internal name (i)]) <boolean>
- Move the player's angles to the camera - this will stop them from looking around.
Flags
- 4 : Freeze Player
- 32 : Make Player non-solid
Inputs
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.
- Enable
- Enable the view proxy, and start modifying the player's view.
- Disable
- Disable the view proxy, and start modifying the player's view.
- TeleportPlayerToProxy
- Move the player to the view proxy.