Point enable motion fixup: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Cleanup)
m (Template:in code -> Template:code class.)
Line 1: Line 1:
{{base point|point_enable_motion_fixup}} It is used to move a motion-disabled prop when it enables motion. Parent this entity to the prop, and when the prop has its motion enabled, it will immediately teleport to the origin of this entity.  
{{base point|point_enable_motion_fixup}}
It is used to move a motion-disabled prop when it enables motion. Parent this entity to the prop, and when the prop has its motion enabled, it will immediately teleport to the origin of this entity.  


{{in code|class=class_c_enable_motion_fixup.html CEnableMotionFixup|file=props_8cpp-source.html props.cpp}}
{{code class|CEnableMotionFixup|props.cpp}}


==Keyvalues==
==KeyValues==
{{KV Parentname}}
{{KV Parentname}}
{{KV Angles}}
{{KV Angles}}

Revision as of 12:11, 15 May 2022

Template:Base point It is used to move a motion-disabled prop when it enables motion. Parent this entity to the prop, and when the prop has its motion enabled, it will immediately teleport to the origin of this entity.

C++ In code, it is represented by theCEnableMotionFixupclass, defined in theprops.cppfile.

KeyValues

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) <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.

Inputs

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/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 <stringRedirectInput/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.