From Valve Developer Community
Revision as of 05:38, 20 January 2009 by VDCBot (Robot: fixing template case.)
C++ function used to control the parent of the current entity.
FollowEntity( CBaseEntity *pBaseEntity, bool bBoneMerge = true )
- Defines a parent. In doing so:
pBaseEntity = NULL
- The entity leaves its parent and moves on its own.
StopFollowingEntity()may also be used, but it will not reset the entity's
bBoneMerge = false
- Prevent the current entity from moving with
pBaseEntity's animations. It will move relative to
pBaseEntity's origin only.
To do: How to choose an attachment point?
GetFollowedEntity()returns the parent entity as
trueis the entity has a parent.