From GMod Wiki
Revision as of 20:19, 7 February 2011 by Athos
|Syntax||Entity:SetParent( Entity Parent )|
|Sets (or clears) the entity's parent.|
|BBCode Link:||[b][url=http://wiki.garrysmod.com/?title=Entity.SetParent]Entity.SetParent [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]|
- Parent is optional. If parent isn't given, or nil is given in it's place, the entity's parent will be cleared.
- Child entities will move with the parent entity.
- Currently, entities with a parent can not be safely interacted with. Bounding boxes are invisible and are not aligned properly.
- Currently, through my testings, entities that are parented and that are moved with the phys gun, create a clone of it's physics model somewhere else on the map. This physics model can collide with players and entities.
- Currently, you can parent 2 entities and weld them to restore the physics on the child and still have some qualities of parenting.
- You can also use Entity:SetSolid() instead of welding to restore the physics.