Follow Game Object LPK_FollowGameObject.cs

This component can be added to any object to cause it to follow another object's position.

Note: This does so without any parenting.

Suggested use:

Apply to an enemy or pickup object to make it follow another specified object, like the player.

Examples found in: Project 2

Components
Property Type Description Default Value
Component Properties
Follow Object Object Game object to follow. If deleted or set to null, this script will try to find a tagged object to follow. None
Target Follow Tag Tag Tag to search for to find an object to follow, if the original Follow Object is deleted or set to null. Untagged
Follow Type LPK_FollowType How this object will behave when following its target. ANCHOR_POINT
Anchor Point
Anchor Offset Vector3 What offset to keep from the followed object. 0,0,0
Directional Offset Integer What offset to keep from the followed object. Used for every type except ANCHOR_POINT. 4
Interpolation Factor Float What percentage of the distance between my current position and the target's should I move every frame. 0.1
Become Child Boolean Set the object to become a child of whatever it is following. False