Railcam 2D
Store

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 InfluenceX of other targets, and is normalized during target position calculation. This means that two targets with respective values of 0.25f and 0.5f have the same influence as two targets with respective values of 0.5f and 1f. If there is only one target, any value higher than 0f is normalized to 1f.


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 InfluenceY of other targets, and is normalized during target position calculation. This means that two targets with respective values of 0.25f and 0.5f have the same influence as two targets with respective values of 0.5f and 1f. If there is only one target, any value higher than 0f is normalized to 1f.


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.

Jonathan Madelaine © 2020