This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.PlayerPersecutor Class

Inherits: Player

This class is used to create a free flying camera without a physical body that follows the target node at the specified distance. The exact point of the target it follows is called an anchor. The persecutor can either turn around its target or its viewing direction can be fixed. Just like PlayerSpectator it is approximated with a sphere, which allows it to collide with objects (but it cannot, for example, to push or interact with them).

See Also#

A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/players/ folder:

  • persecutor_00
  • persecutor_01

PlayerPersecutor Class

Properties

int NumContacts#

The number of contacts, in which the player's capsule participates.

float ThetaAngle#

The theta angle (zenith angle, also known as pitch angle). this angle determines the vertical viewing direction, i.e. upwards or downwards. if a positive value is returned, the player looks upwards; if a negative value is returned, the player looks downwards. the value is clamped between the minimum and the maximum theta angle.
set
Sets the theta angle of the player (zenith angle, also known as pitch angle). This angle determines the vertical viewing direction, i.e. upwards or downwards. The value will be clamped between the minimum and the maximum theta angle.
set value - New angle in degrees in range [-90;90]. If a positive value is specified, the player will look upwards; if a negative value is specified, the player will look downwards.

float PhiAngle#

The phi angle (azimuth angle, also known as yaw angle). this angle determines the horizontal viewing direction, i.e. left or right. positive values rotate the player right; negative values rotate the player left.
set
Sets the phi angle (azimuth angle, also known as yaw angle). This angle determines the horizontal viewing direction, i.e. left or right.
set value - New angle in degrees. Positive values rotate the player to the right; negative values rotate it to the left.

float Distance#

The current distance between the target and the persecutor. the value is clamped between the minimum and the maximum distance values.
set
Sets a distance between the target node and the persecutor. The value will be clamped between the minimum and the maximum distance values.
set value - New distance in units.

float Turning#

A velocity of player turning.
set
Sets a velocity of player turning.
set value - Turning velocity in degrees per second. If a negative value is provided, 0 will be used instead.

float MaxThetaAngle#

The maximum theta angle (zenith angle, also known as pitch angle) that determines how far downward the player can look. the higher the value, the further down the player can look.
set
Sets the maximum theta angle (zenith angle, also known as pitch angle) that determines how far downward the player can look.
set value - New angle in degrees in range [0;90]. The higher the value, the further down the player can look.

float MinThetaAngle#

The minimum theta angle (zenith angle, also known as pitch angle) that determines how far upward the player can look. the lower the value, the further up the player can look.
set
Sets the minimum theta angle (zenith angle, also known as pitch angle) that determines how far upward the player can look.
set value - New angle in degrees in range [-90;0]. The lower the value, the further up the player can look.

float MaxDistance#

The maximum possible distance between the persecutor and the target.
set
Sets the maximum possible distance between the persecutor and the target.
set value - New distance in units.

float MinDistance#

The minimum possible distance between the persecutor and the target.
set
Sets the minimum possible distance between the persecutor and the target.
set value - New distance in units.

vec3 Anchor#

Coordinates of an anchor point (in the target node local coordinates), to which the persecutor is bound.
set
Sets coordinates of an anchor point (in the target node local coordinates), to which the persecutor is bound.
set value - Anchor coordinates.

Node Target#

The object currently followed by the persecutor.
set
Sets an object, which will be followed by the persecutor.
set value - New target node.

float CollisionRadius#

Radius of the persecutor's collision sphere.
set
Sets the radius of the persecutor's collision sphere.
set value - New radius of the collision sphere.

int CollisionMask#

A collision mask of the persecutor's collision sphere. two objects collide, if they both have matching masks.
set
Sets a collision mask for the persecutor's collision sphere. Two objects collide, if they both have matching masks.
set value - An integer value, each bit of which is a mask.

int Collision#

A value indicating if collisions with persecutor's sphere should be taken into account.
set
Sets a value indicating if collisions with persecutor's sphere should be taken into account.
set value - Positive number to allow collisions, 0 to let the persecutor fly through objects.

bool IsFixed#

A value indicating if the persecutor can freely rotate around its target or it is oriented strictly in one direction. the fixed viewing direction is the same direction the persecutor was looking in when the setFixed() function is called, though it can be reset to another one afterwards.
set
Sets a value indicating if the persecutor can freely rotate around its target or it is oriented strictly in one direction. The fixed viewing direction is the same direction the persecutor was looking in when this function is called, though it can be reset to another one afterwards.
set value - true to orient the player strictly in one direction, false to let it rotate freely.

Members


static PlayerPersecutor ( ) #

Constructor. Creates a new persecutor with default properties.

float GetContactDepth ( int contact ) #

Returns penetration depth by the given contact.

Arguments

  • int contact - Contact number.

Return value

Penetration depth.

vec3 GetContactNormal ( int contact ) #

Returns a normal of the contact point, in world coordinates.

Arguments

  • int contact - Contact number.

Return value

Normal of the contact point..

Object GetContactObject ( int contact ) #

Returns an object participating in the contact with the player (used for collisions with physical object).

Arguments

  • int contact - Contact number.

Return value

Object in contact.

vec3 GetContactPoint ( int contact ) #

Returns world coordinates of the contact point.

Arguments

  • int contact - Contact number.

Return value

Contact point.

Shape GetContactShape ( int num ) #

Returns a shape that collided with the player.

Arguments

  • int num - Contact number.

Return value

Shape in contact.

int GetContactSurface ( int contact ) #

Returns the surface of the current object, which is in contact (used for collisions with non-physical object).

Arguments

  • int contact - Contact number.

Return value

Surface number.

static int type ( ) #

Returns the type of the player.

Return value

PlayerPersecutor type identifier.
Last update: 2020-11-24
Build: ()