User:CodingAintFun/pagetest00: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{obsolete|entity=1}} {{this is a|e1|name=func_instance_origin|engine=2|since=Portal 2}} The entity is supposed to set the center of an instance for placement and rotation, bu...")
 
No edit summary
Line 1: Line 1:
{{obsolete|entity=1}}
{{CD|CPhysConstraintSystem|file1=physconstraint.cpp}}
{{this is a|e1|name=func_instance_origin|engine=2|since=Portal 2}} The entity is supposed to set the center of an instance for placement and rotation, but it appears to have only been partially implemented. The entity will affect the positioning of the instance in Hammer, but the bounding box isn't updated to match, and it has no effect in the compiled map; the instance will be placed with the center of the VMF as the origin as usual.
{{base point|phys_constraintsystem}} If you have a collection of objects connected by [[:Category:Constraints|constraints]], you may encounter vibration or jiggling. This is because each constraint is solved without regard for any others until you introduce a '''phys_constraintsystem'''.


{{intent}}
To implement a phys_constraintsystem create one and give it a name, then select the constraints you want to group together and set it as their "Constraint System Manager".
{{todo|VBSP ''is'' if fact processing and removing the entity (as indicated by the lack of any unknown entity errors in-game), but doesn't seem to actually be doing anything with it. Maybe the entity can be made to work somehow?}}


==See also==
A constraintsystem also allows you to control the number of iterations performed on the constraints, allowing you to allocate more CPU to get the solution tighter. This will help when objects of dissimilar mass are connected, as if a large-mass object is in violation of the constraint it will take more iterations for it to move to a non-violating position/orientation. [[Ragdoll]]s create a constraint system internally to solve these issues.
*[[func_instance]]
*[[func_instance_parms]] - Entity to control parameters within instances.
*[[func_instance_io_proxy]] - Entity that is used as a proxy for entity I/O within instances.


[[Category:Instances|origin]]
== Keyvalues ==
{{KV|Additional System Iterations|intn=additionaliterations|integer|Adding iterations makes the interactions among constraints in a system tighter. It will not compensate for errors due to collision, but will help in cases where objects of disparate mass are constrained to each other.}}
{{KV Targetname}}
 
[[Category:Constraints|C]]

Revision as of 07:17, 16 December 2023

C++ Class hierarchy
CPhysConstraintSystem
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ physconstraint.cpp

Template:Base point If you have a collection of objects connected by constraints, you may encounter vibration or jiggling. This is because each constraint is solved without regard for any others until you introduce a phys_constraintsystem.

To implement a phys_constraintsystem create one and give it a name, then select the constraints you want to group together and set it as their "Constraint System Manager".

A constraintsystem also allows you to control the number of iterations performed on the constraints, allowing you to allocate more CPU to get the solution tighter. This will help when objects of dissimilar mass are connected, as if a large-mass object is in violation of the constraint it will take more iterations for it to move to a non-violating position/orientation. Ragdolls create a constraint system internally to solve these issues.

Keyvalues

Additional System Iterations (additionaliterations) <integer>
Adding iterations makes the interactions among constraints in a system tighter. It will not compensate for errors due to collision, but will help in cases where objects of disparate mass are constrained to each other.
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