FollowEntity(): Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| TomEdwards (talk | contribs) mNo edit summary | m (Robot: fixing template case.) | ||
| Line 17: | Line 17: | ||
| :Prevent the current entity from moving with <code>pBaseEntity</code>'s animations. It will move relative to <code>pBaseEntity</code>'s origin only. | :Prevent the current entity from moving with <code>pBaseEntity</code>'s animations. It will move relative to <code>pBaseEntity</code>'s origin only. | ||
| {{ | {{Todo|How to choose an attachment point?}} | ||
| == Related functions == | == Related functions == | ||
Revision as of 20:21, 19 January 2009
C++ function used to control the parent of the current entity.
Syntax
FollowEntity( CBaseEntity *pBaseEntity, bool bBoneMerge = true )
Values
- pBaseEntity
- Defines a parent. In doing so:
- Zeroes origin and angles
- Sets MOVETYPE_NONE
- Adds FSOLID_NOT_SOLID
 
- pBaseEntity = NULL
- The entity leaves its parent and moves on its own. StopFollowingEntity()may also be used, but it will not reset the entity'sMoveType.
- bBoneMerge = false
- Prevent the current entity from moving with pBaseEntity's animations. It will move relative topBaseEntity's origin only.
Todo: How to choose an attachment point?
Related functions
- GetFollowedEntity()returns the parent entity as- C_BaseEntity.
- IsFollowingEntity()returns- trueis the entity has a parent.