PlayerLinkToDelta( <linkto entity>, <tag>, <viewpercentag fraction>, <right arc>, <left arc>, <top arc>, <bottom arc>, <use tag angles> )


Module: Player
SP Only

Summary:

Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical)



Call this on:

A Player Entity



Example:

level.player PlayerLinkToDelta( vehicle, "tag_player", 0.5 );



Required Args:

  • 1 : <linkto entity> The entity to attach the player to.


Optional Args

  • 1 : <tag> The tag to attach the player to.
  • 2 : <view fraction> How much the change in the tag's rotation effects the players view. Defaults to 0.
  • 3 : <right arc> Angle to clamp view to the right. Defaults to 180.
  • 4 : <left arc> Angle to clamp view to the left. Defaults to 180.
  • 5 : <top arc> Angle to clamp view to the top. Defaults to 180.
  • 6 : <bottom arc> Angle to clamp view to the bottom. Defaults to 180.
  • 7 : <use tag angles> Determines how the player's view will be tilted. 'False' (default) means that the orientation of the tag when the player is linked will appear flat to the player. Any rotation from that orientation will tilt the player's view. 'True' means that only a tag angles of (0,0,0) will appear flat to the player. Any rotation from (0,0,0) will tilt the player's view.