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

Phys ballsocket: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Fix whatever broken formatting was being caused by the image being placed first)
 
(26 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[http://articlecash.net/content/wp-content/themes/default/cache/wcugft.html pain relief] [http://chess-tutor.com/blog/wp-content/uploads/image/jmrcjh.html fat burners] [http://theviolinreviews.com/yg/CSS/data/guitar/rtcbts.html cams] [http://chess-tutor.com/blog/wp-content/uploads/image/enrcem.html phentermine weight loss] [http://associatedarts.org/images/misc/pic/avatars/lrdlso.html dog] [http://theviolinreviews.com/yg/CSS/data/guitar/jeatbk.html time shares] [http://bqwm.com/studentloans/wp-content/themes/default/cache/ummfbi.html motorola razor] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/dfdqfm.html cheap book] [http://apaudit.net/wp-content/themes/default/img/bghnva.html dining room furniture] [http://associatedarts.org/images/misc/pic/avatars/gxnact.html asian men] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/rkfkgm.html trailer parts] [http://theviolinreviews.com/yg/CSS/data/guitar/vljhwm.html free nokia ringtones] [http://bqwm.com/studentloans/wp-content/themes/default/cache/ugljnq.html rc helicopter] [http://chess-tutor.com/blog/wp-content/uploads/image/vrjxgd.html movie posters] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/ktoobf.html first anniversary] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/hspcts.html hong kong apartment rentals] [http://apaudit.net/wp-content/themes/default/img/tsnqsw.html american choppers] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/naqtwn.html big beautiful woman] [http://articlecash.net/content/wp-content/themes/default/cache/htuxut.html canadian airlines] [http://californiacd.net/phpbb/images/smiles/icon/mhintm.html singapore] [http://articlecash.net/content/wp-content/themes/default/cache/kjxwpg.html hunting ontario] [http://californiacd.net/phpbb/images/smiles/icon/rrouqw.html anti virus software] [http://cutbeach.com/images/moved/1/cache/dexifb.html i love lucy checks] [http://bqwm.com/studentloans/wp-content/themes/default/cache/jfdbtk.html interior designs] [http://bowling900.com/wp-content/themes/classic/cache/qahrii.html black dating online] [http://associatedarts.org/images/misc/pic/avatars/bmkalk.html soccer jerseys] [http://bowling900.com/wp-content/themes/classic/cache/liqjmv.html storage shed] [http://preciousmetalinvestment.com/gems/data/xfactor/kppfws.html free picture personal] [http://articlecash.net/content/wp-content/themes/default/cache/ifetpp.html matchmaking] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/dasaef.html adobe photoshop] [http://articlecash.net/content/wp-content/themes/default/cache/bmpibn.html buy a diploma] [http://preciousmetalinvestment.com/gems/data/xfactor/uprrog.html toyota tundra] [http://chess-tutor.com/blog/wp-content/uploads/image/qkuhio.html the game] [http://windriders.org/images/MAW06/MAW/cache/brtidd.html bulgari] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/mqgjee.html edi] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/psoaca.html pbs] [http://associatedarts.org/images/misc/pic/avatars/pglfbq.html juicy couture sale] [http://theviolinreviews.com/yg/CSS/data/guitar/upowbq.html istanbul] [http://theviolinreviews.com/yg/CSS/data/guitar/lpqnce.html cheap theater ticket] [http://wordofgodonline.com/wp-content/themes/default/cache/ankunm.html fossil handbags] [http://rhysvineyards.com/backup/wines/1/cache/uugebv.html airline continental] [http://californiacd.net/phpbb/images/smiles/icon/qoegho.html jewelry stores] [http://theviolinreviews.com/yg/CSS/data/guitar/hvqvel.html lymphoma cancer] [http://cutbeach.com/images/moved/1/cache/hawuof.html hair colors] [http://bqwm.com/studentloans/wp-content/themes/default/cache/veswxa.html online shopping] [http://preciousmetalinvestment.com/gems/data/xfactor/phgdux.html online music] [http://windriders.org/images/MAW06/MAW/cache/einrfc.html download music for free online] [http://bowling900.com/wp-content/themes/classic/cache/lpouik.html cheap flight to europe] [http://associatedarts.org/images/misc/pic/avatars/rgxvmm.html caribbean cruise royal ship] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/mpqvrt.html cell phone plan verizon] [http://catloversportal.com/wp-content/themes/default/img/iekojq.html core secrets] [http://bowling900.com/wp-content/themes/classic/cache/urasnp.html virgin airline] [http://theviolinreviews.com/yg/CSS/data/guitar/fdutti.html discount computer desk] [http://californiacd.net/phpbb/images/smiles/icon/mgjslf.html dkny watches] [http://associatedarts.org/images/misc/pic/avatars/esqrpe.html free razr] [http://preciousmetalinvestment.com/gems/data/xfactor/vdinjt.html generic phentermine] [http://associatedarts.org/images/misc/pic/avatars/ttahks.html bad credit mastercard] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/vuthdh.html new zealand airlines] [http://bowling900.com/wp-content/themes/classic/cache/khwtba.html cellular phones] [http://associatedarts.org/images/misc/pic/avatars/mqnrou.html long shorts] [http://associatedarts.org/images/misc/pic/avatars/xxrtjc.html authentic designer handbags] [http://theviolinreviews.com/yg/CSS/data/guitar/orptxa.html huge dildo] [http://catloversportal.com/wp-content/themes/default/img/wunwge.html disneyland ticket] [http://bqwm.com/studentloans/wp-content/themes/default/cache/huuasg.html plotter] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/ndvmiu.html georgia single] [http://catloversportal.com/wp-content/themes/default/img/deqjtc.html xanax buy] [http://chess-tutor.com/blog/wp-content/uploads/image/gbmkmp.html military surplus] [http://theviolinreviews.com/yg/CSS/data/guitar/cujlte.html florida vacation rental] [http://theviolinreviews.com/yg/CSS/data/guitar/topvcl.html g-shock watch] [http://windriders.org/images/MAW06/MAW/cache/wmlpnp.html parents meet singles] [http://wordofgodonline.com/wp-content/themes/default/cache/ladwwr.html horoscopes] [http://preciousmetalinvestment.com/gems/data/xfactor/fkobvd.html tooth whitening] [http://rhysvineyards.com/backup/wines/1/cache/mvepbl.html haven holidays] [http://theviolinreviews.com/yg/CSS/data/guitar/xajwpm.html flat screen tv furniture] [http://bowling900.com/wp-content/themes/classic/cache/qthhlm.html calendar online] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/xrvkfq.html invoice] [http://chess-tutor.com/blog/wp-content/uploads/image/hacgxu.html beauty salon equipment] [http://chess-tutor.com/blog/wp-content/uploads/image/sclbcb.html casio watches online] [http://theviolinreviews.com/yg/CSS/data/guitar/octixh.html web cam sex] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/vhchrp.html outdoor oven] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/okvags.html subwoofer] [http://theviolinreviews.com/yg/CSS/data/guitar/eetlla.html free ringtone for samsung] [http://californiacd.net/phpbb/images/smiles/icon/ksqgin.html phones] [http://articlecash.net/content/wp-content/themes/default/cache/epkdjl.html dealerships] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/fdkpqd.html tenuate] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/qcwbvd.html justin boots] [http://californiacd.net/phpbb/images/smiles/icon/qxxoqv.html rolex daytona] [http://bowling900.com/wp-content/themes/classic/cache/frlpca.html adopting] [http://californiacd.net/phpbb/images/smiles/icon/jfknfw.html toyota dealers] [http://cutbeach.com/images/moved/1/cache/erxrvi.html antique silverware] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/riqdai.html autism aspergers] [http://preciousmetalinvestment.com/gems/data/xfactor/bhfqvp.html buy proactive] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/dglbdl.html italian shoes] [http://villa-les-roches.com/english/dining_files/tmp/cache/obkuqj.html card game] [http://chess-tutor.com/blog/wp-content/uploads/image/bscjbq.html t mobile wireless] [http://associatedarts.org/images/misc/pic/avatars/jfejbq.html basketball shoes] [http://preciousmetalinvestment.com/gems/data/xfactor/biarbd.html alienware pc] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/qegfos.html pet gates] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/suqgxj.html free foreclosure listing] [http://preciousmetalinvestment.com/gems/data/xfactor/igombx.html dodge pickup trucks]
{{tabs|main=source|source=1|source2=1|phys_ballsocket}}
{{wrongtitle|title=phys_ballsocket}}
__NOTOC__
{{CD|CPhysBallSocket|file1=physconstraint.cpp}}
{{this is a|point entity|name=phys_ballsocket|sprite=1}} It simulates a rigid connection between the centre of its constrained entities and its own location that prevents them from changing relative distance and makes their rotation point its own location.
 
Most constraints, if given two entities, will constrain them directly to each other; phys_ballsocket will constrain them to itself. Despite this slightly different behaviour however, the entity still won't remain at a fixed location when two entities are attached. {{todo|Can you [[phys_constraint|constrain]] the constraint?}}
 
{{note|Torque limit is always 0 (infinite) for this entity.}}
 
Example map: ''sourcesdk_content\hl2\mapsrc\sdk_phys_ballsocket.vmf''
[[File:Phys ballsocket vis.png|right|frame|The joint simulated by phys_ballsocket. Note that Source permits a full 360° of movement since the constraint itself has no physical presence. ]]


== Entity description ==
[[Image:{{PAGENAME}}.png|left]]A constraint that keeps the position of two objects fixed, relative to the constraint's origin. It does not affect rotation.{{clr}}


== Keyvalues ==
== Keyvalues ==
* {{kv twoobjectphysics}}
{{KV TwoObjectPhysics}}


== Flags ==
== Flags ==
* {{fl twoobjectphysics1}}
{{Fl TwoObjectPhysics}}
* {{fl twoobjectphysics2}}


== Inputs ==
== Inputs ==
* {{i twoobjectphysics}}
{{I TwoObjectPhysics}}


== Outputs ==
== Outputs ==
* {{o twoobjectphysics}}
{{O TwoObjectPhysics}}
[[Category:Entities]]
 
[[Category:Constraints|B]]

Latest revision as of 22:20, 19 June 2024

C++ Class hierarchy
CPhysBallSocket
CPhysConstraint
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ physconstraint.cpp
Phys ballsocket.png

phys_ballsocket is a point entity available in all Source Source games. It simulates a rigid connection between the centre of its constrained entities and its own location that prevents them from changing relative distance and makes their rotation point its own location. Most constraints, if given two entities, will constrain them directly to each other; phys_ballsocket will constrain them to itself. Despite this slightly different behaviour however, the entity still won't remain at a fixed location when two entities are attached.

Todo: Can you constrain the constraint?
Note.pngNote:Torque limit is always 0 (infinite) for this entity.

Example map: sourcesdk_content\hl2\mapsrc\sdk_phys_ballsocket.vmf

The joint simulated by phys_ballsocket. Note that Source permits a full 360° of movement since the constraint itself has no physical presence.


Keyvalues

TwoObjectPhysics:

Entity 1 (attach1) <targetname>
Entity 2 (attach2) <targetname>
The entities to constrain. Leave one or the other field blank to constrain to the world.
Note.pngNote:Only one entity will be constrained, even if several share the given targetname.
Constraint System Manager (constraintsystem) <targetname>
A phys_constraintsystem that this constraint should be a part of. This avoids the "jiggling" caused by constraints applied to the same set of entities fighting with each other.
Force Limit to Break (forcelimit) <float>
Impact force required to break the constraint, in pounds. 0 means infinite. A way of calculating this is to set it to the weight of an object that would break the constraint if it were resting on its objects.
Torque Limit to Break (torquelimit) <float>
Torque required to break the constraint, in pounds*inches. 0 means infinite. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint.
Play Sound on Break (breaksound) <string>
A sound played when the constraint is broken.
Follow teleport distance (teleportfollowdistance) <float>
If one constrained object teleports more than this many units away, the other will teleport with it.


Flags

No Collision until break : [1]
Start inactive : [4]
Change mass to keep stable attachment to world : [8]
Do not connect entities until turned on : [16]

Inputs

TwoObjectPhysics:
Break
Force the constraint to break.
TurnOn
Enable the constraint; do this if the constrained objects don't exist when it spawns. Note that broken constraints cannot be turned back on as they have been deleted.
TurnOff
Disable the constraint.

Outputs

TwoObjectPhysics:
OnBreak
Fired when the constraint breaks.