CameraTarget
public class Railcam2D.CameraTarget;A target object for a camera to follow.
Public Members
InfluenceX
[RangeAttribute(0f, 1f)]
public float InfluenceX = 1f;| Member | Field |
| Type | float |
| Defaults To | 1f |
| Min | 0f |
| Max | 1f |
A float that determines the amount the camera's position is effected by the target's position along the x-axis.
The value is clamped between 0f (no effect on camera position) and 1f (maximum effect on camera position).
This value is relative to the
InfluenceXof other targets, and is normalized during target position calculation. This means that two targets with respective values of0.25fand0.5fhave the same influence as two targets with respective values of0.5fand1f. If there is only one target, any value higher than0fis normalized to1f.
InfluenceY
[RangeAttribute(0f, 1f)]
public float InfluenceY = 1f;| Member | Field |
| Type | float |
| Defaults To | 1f |
| Min | 0f |
| Max | 1f |
A float that determines the amount the camera's position is effected by the target's position along the y-axis.
The value is clamped between 0f (no effect on camera position) and 1f (maximum effect on camera position).
This value is relative to the
InfluenceYof other targets, and is normalized during target position calculation. This means that two targets with respective values of0.25fand0.5fhave the same influence as two targets with respective values of0.5fand1f. If there is only one target, any value higher than0fis normalized to1f.
Position
public Vector3 Position { get; }| Member | Property |
| Type | UnityEngine.Vector3 |
| Accessors | get |
A Vector3 that represents the target object's position in the scene. This is equivalent to the CameraTarget.Transform's position value.
Transform
public Transform Transform = null;| Member | Field |
| Type | UnityEngine.Transform |
| Defaults To | null |
A Transform equal to the Transform component of the target object. If this value is null, the camera will not follow the target.