Talk:Entity Hierarchy (parenting)

From Valve Developer Community
Jump to: navigation, search

Might want to add some pictures to get a better idea of parenting. Sometimes parenting can become very advanced, and this article doesn't explain all that may be needed of information.--Gear 01:37, 4 Sep 2007 (PDT)

Can entities be parented to the player in single-player? Would you just use "!player"? I've noticed that Baxayaun alluded to it in some of his SDK Project comments, but some experiments suggest that it doesn't work - the object often stays there, where the player spawned. --Campaignjunkie (talk) 18:02, 22 Oct 2007 (PDT)

A few collision and movement errors may happen if things are parented to "!player"... Also, has anyone noticed that the concommand: "ent_fire !picker setparent !player" works on physics objects like barrels and such? --Darthkillyou 09:25, 9 Mar 2008 (PDT)


prop_physics can be parented - although it shows as an error in Hammer. When you clear parent though, I think it reverts to wherever the object was when it was parented. I tested this by creating a rotating cube, parented a prop_physics to it, rotating, then clearing parents - the prop seemed to teleport back to where it was initially. --- RodeoClown 20:21, 8 Apr 2008 (PDT)

Also, physics collisions become messed up while parented (things pass through walls, etc.) --Darthkillyou 12:57, 13 May 2008 (PDT)

Parenting to NPCs?

Doesn't always work so well for some reason... especially when dealing with attachments. Is this something unique to Orange Box? I never seemed to run into these kinds of problems in the original HL2 SDK. --dky 16:11, 30 March 2010 (UTC)

I think you can't parent an object to an NPC because of the NPC's complex movement. For example, how do you think the child object would react if it was parented to an NPC that was shot by your pistol or something? --Nathaniel 02:42, 21 October 2010 (UTC)
Parenting to npcs works fine, it's used for Barney's mask take-off and crowbar toss. --Omnicoder 18:59, 21 October 2010 (UTC)
If you parent something to an NPC, it usually (or always?) becomes non-solid. --Campaignjunkie (talk) 04:00, 22 October 2010 (UTC)

Experiment gone wrong? Deletion?

Beeswax once made a page called Deleteme - movement hierarchy in an attempt to have movement hierarchy deleted, which in turn redirects to this article. He says something about his "experiment failing". With this in mind, make sure to doublecheck everything Beeswax says in this article, because he became convinced that he was wrong about something fundamental. --MossyBucket (formerly Andreasen) 23:57, 2 February 2011 (UTC)

SetLocalAngles/SetLocalOrigin

Does anyone know where these inputs first appear? They exist on every parentable entity (and are fully functional) in Portal 2, and presumably other games but I don't know which version of Source they were added in. --TeamSpen210 20:02, 14 September 2014 (UTC)