This article's documentation is for anything that uses the Source engine. Click here for more information.

Phys keepupright: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(17 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{wrongtitle|title=phys_keepupright}}
{{tabs|main=source|source=1|source2=1|phys_keepupright}}
==Entity Description==
{{CD|CKeepUpright|file1=phys_controller.cpp}}
[[Image:{{PAGENAME}}.png|left]]A controller that tries to keep an entity facing a particular direction.{{clr}}
{{this is a|point entity|name=phys_keepupright|engine=Source}} It is a controller that tries to keep an entity facing a particular direction.


==Keyvalues==
== Keyvalues ==
*{{kv targetname}}
{{KV|Target Entity|intn=attach1|target_destination|The entity to align to the desired angles.}}
*{{kv angles}}
{{KV|Angular Limit|intn=angularlimit|float|The maximum angular velocity that this controller can compensate for, in degrees per second.}} {{tip| Common Value {{code|90}} }}
*'''attach1''' <target_destination>
{{KV Targetname}}
:The entity to align to the desired angles.
{{KV Angles}}
*'''angularlimit''' <float>
:The maximum angular velocity that this controller can compensate for, in degrees per second.


==Flags==
== Flags ==
*1: Start inactive
{{fl|1|Start inactive}}


==Inputs==
== Inputs ==
*{{i targetname}}
{{I|TurnOn|Enable the controller.}}
*'''TurnOn'''
{{I|TurnOff|Disable the controller.}}
:Enable the controller.
*'''TurnOff'''
:Disable the controller.


==Outputs==
[[Category:Constraints|C]]
*{{o targetname}}
 
[[Category:Entities]]

Latest revision as of 12:21, 7 September 2025

C++ Class hierarchy
CKeepUpright
CPointEntity
CBaseEntity
C++ phys_controller.cpp

phys_keepupright is a point entity available in all Source Source games. It is a controller that tries to keep an entity facing a particular direction.

Keyvalues

Target Entity (attach1) <targetname>
The entity to align to the desired angles.
Angular Limit (angularlimit) <float>
The maximum angular velocity that this controller can compensate for, in degrees per second.
Tip.pngTip: Common Value 90
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
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.

Flags

Start inactive : [1]

Inputs

TurnOn
Enable the controller.
TurnOff
Disable the controller.