Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
override void | _Update () |
override void | SwitchTarget (Transform _target) |
Switches the camera's target. More... | |
override void | MoveCameraInstant () |
Public Member Functions inherited from AC.CursorInfluenceCamera | |
override Vector2 | CreateRotationOffset () |
Returns a vector by which to tweak the camera's rotation. The x-axis will control the spin, and the y-axis will control the pitch. More... | |
void | ShowCursorInfluenceGUI () |
Public Member Functions inherited from AC._Camera | |
virtual bool | Is2D () |
Checks if the camera is for 2D games. This is necessary for working out if the MainCamera needs to change its projection matrix. More... | |
virtual void | ResetTarget () |
void | SetSplitScreen () |
void | RemoveSplitScreen () |
virtual Vector2 | GetPerspectiveOffset () |
Gets the actual horizontal and vertical panning offsets. More... | |
bool | IsActive () |
Checks if the Camera is currently the MainCamera's active camera (attachedCamera) More... | |
void | MakeActive () |
Public Attributes | |
bool | actFromDefaultPlayerStart = true |
bool | lockXLocAxis = true |
bool | lockYLocAxis = true |
bool | lockZLocAxis = true |
bool | lockXRotAxis = true |
bool | lockYRotAxis = true |
bool | lockFOV = true |
CameraLocConstrainType | xLocConstrainType |
CameraLocConstrainType | yLocConstrainType = CameraLocConstrainType.TargetHeight |
CameraLocConstrainType | zLocConstrainType |
CameraLocConstrainType | xRotConstrainType = CameraLocConstrainType.TargetHeight |
CameraRotConstrainType | yRotConstrainType |
float | xGradient = 1f |
float | yGradientLoc = 1f |
float | zGradient = 1f |
float | xGradientRot = 2f |
float | yGradient = 2f |
float | FOVGradient = 2f |
float | xOffset = 0f |
float | yOffsetLoc = 0f |
float | zOffset = 0f |
float | xOffsetRot = 0f |
float | yOffset = 0f |
float | FOVOffset = 0f |
float | xFreedom = 2f |
float | yFreedom = 2f |
float | zFreedom = 2f |
bool | limitX |
bool | limitYLoc |
bool | limitZ |
bool | limitXRot |
bool | limitY |
bool | limitFOV |
float | targetHeight |
float | targetXOffset |
float | targetZOffset |
Vector2 | constrainX |
Vector2 | constrainYLoc |
Vector2 | constrainZ |
Vector2 | constrainXRot |
Vector2 | constrainY |
Vector2 | constrainFOV |
float | directionInfluence = 0f |
float | dampSpeed = 0.9f |
bool | focalPointIsTarget = false |
Public Attributes inherited from AC.CursorInfluenceCamera | |
bool | followCursor = false |
Vector2 | cursorInfluence = new Vector2 (0.3f, 0.1f) |
bool | constrainCursorInfluenceX = false |
Vector2 | limitCursorInfluenceX |
bool | constrainCursorInfluenceY = false |
Vector2 | limitCursorInfluenceY |
float | followCursorSpeed = 3f |
CutsceneBehaviour | cutsceneBehaviour = CutsceneBehaviour.Freeze |
Public Attributes inherited from AC._Camera | |
bool | targetIsPlayer = true |
Transform | target |
bool | isDragControlled = false |
float | focalDistance = 10f |
Protected Member Functions | |
override void | Awake () |
override void | Start () |
void | SetTargetOriginalPosition () |
void | TrackTarget2D_X () |
void | TrackTarget2D_Y () |
void | TrackTarget2D_Z () |
float | GetDesiredPosition (float originalValue, float gradient, float offset, CameraLocConstrainType constrainType) |
bool | AllLocked () |
void | SetFocalPoint () |
void | SetOriginalPosition () |
void | SetDesired () |
void | SetDesiredFOV () |
Protected Member Functions inherited from AC._Camera | |
virtual void | OnEnable () |
virtual void | OnDisable () |
Vector3 | PositionRelativeToCamera (Vector3 _position) |
Vector3 | RightVector () |
Vector3 | ForwardVector () |
float | ConstrainAxis (float desired, Vector2 range, bool isAngle=false) |
Protected Attributes | |
Vector3 | desiredPosition |
float | desiredSpin |
float | desiredPitch |
float | desiredFOV |
Vector3 | originalTargetPosition |
Vector3 | originalPosition |
float | originalSpin |
float | originalPitch |
float | originalFOV |
bool | haveSetOriginalPosition = false |
Protected Attributes inherited from AC.CursorInfluenceCamera | |
Vector2 | actualCursorOffset |
Protected Attributes inherited from AC._Camera | |
Char | targetChar |
Camera | _camera |
Vector2 | inputMovement |
bool | is2D = false |
Additional Inherited Members | |
Public Types inherited from AC.CursorInfluenceCamera | |
enum | CutsceneBehaviour { Freeze, Allow, Reset } |
Properties inherited from AC._Camera | |
Transform | Target [get] |
Transform | CameraTransform [get] |
Transform | Transform [get] |
Camera | Camera [get] |
bool | isFor2D [get, set] |
virtual TransparencySortMode | TransparencySortMode [get] |
Vector3 | TargetForward [get] |
virtual bool | CursorOffsetForcesTranslation [get] |
The standard camera used in 3D games.
|
virtual |
Updates the camera. This is called every frame by StateHandler.
Reimplemented from AC._Camera.
|
virtual |
Moves the camera instantly to its destination.
Reimplemented from AC._Camera.
|
virtual |
bool AC.GameCamera.actFromDefaultPlayerStart = true |
If True, then the camera's position will be relative to the scene's default PlayerStart, rather then the Player's initial position. This ensures that camera movement is the same regardless of where the Player begins in the scene
Vector2 AC.GameCamera.constrainFOV |
The lower and upper FOV limits, if limitFOV = True
Vector2 AC.GameCamera.constrainX |
The lower and upper X-axis movement limits, if limitX = True
Vector2 AC.GameCamera.constrainXRot |
The lower and upper pitch rotation limits, if limitXRot = True
Vector2 AC.GameCamera.constrainY |
The lower and upper spin rotation limits, if limitY = True
Vector2 AC.GameCamera.constrainYLoc |
The lower and upper Y-axis movement limits, if limitYLoc = True
Vector2 AC.GameCamera.constrainZ |
The lower and upper Z-axis movement limits, if limitZ = True
float AC.GameCamera.dampSpeed = 0.9f |
The follow speed when tracking a target
float AC.GameCamera.directionInfluence = 0f |
The influence that the target's facing direction has on the tracking position
bool AC.GameCamera.focalPointIsTarget = false |
If True, then focalDistance will match the distance to target
float AC.GameCamera.FOVGradient = 2f |
The influence of the target's position on FOV, if lockFOV = True
float AC.GameCamera.FOVOffset = 0f |
The FOV offset, if lockXLocAxis = False
bool AC.GameCamera.limitFOV |
If True, then FOV will be limited to minimum and maximum values
bool AC.GameCamera.limitX |
If True, then X-axis movement will be limited to minimum and maximum values
bool AC.GameCamera.limitXRot |
If True, then pitch rotation will be limited to minimum and maximum values
bool AC.GameCamera.limitY |
If True, then spin rotation will be limited to minimum and maximum values
bool AC.GameCamera.limitYLoc |
If True, then Y-axis movement will be limited to minimum and maximum values
bool AC.GameCamera.limitZ |
If True, then Z-axis movement will be limited to minimum and maximum values
bool AC.GameCamera.lockFOV = true |
If True, changing of the FOV is prevented
bool AC.GameCamera.lockXLocAxis = true |
If True, movement in the X-axis is prevented
bool AC.GameCamera.lockXRotAxis = true |
If True, pitch rotation is prevented
bool AC.GameCamera.lockYLocAxis = true |
If True, movement in the Y-axis is prevented
bool AC.GameCamera.lockYRotAxis = true |
If True, spin rotation is prevented
bool AC.GameCamera.lockZLocAxis = true |
If True, movement in the Z-axis is prevented
float AC.GameCamera.targetHeight |
The target height offset
float AC.GameCamera.targetXOffset |
The target positional offset in the X-axis
float AC.GameCamera.targetZOffset |
The target positional offset in the Z-axis
float AC.GameCamera.xFreedom = 2f |
The track freedom along the X-axis, if xLocConstrainType = CameraLocConstrainType.SideScrolling
float AC.GameCamera.xGradient = 1f |
The influence of the target's position on X-axis movement, if lockXLocAxis = False
float AC.GameCamera.xGradientRot = 2f |
The influence of the target's position on pitch rotation, if lockXRotAxis = False
CameraLocConstrainType AC.GameCamera.xLocConstrainType |
The constrain type on X-axis movement, if lockXLocAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)
float AC.GameCamera.xOffset = 0f |
The X-axis position offset, if lockXLocAxis = False
float AC.GameCamera.xOffsetRot = 0f |
The pitch rotation offset, if lockXRotAxis = False
CameraLocConstrainType AC.GameCamera.xRotConstrainType = CameraLocConstrainType.TargetHeight |
The constrain type on pitch rotation, if lockXRotAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)
float AC.GameCamera.yFreedom = 2f |
The track freedom along the Y-axis, if yLocConstrainType = CameraLocConstrainType.SideScrolling
float AC.GameCamera.yGradient = 2f |
The influence of the target's position on spin rotation, if lockYRotAxis = False
float AC.GameCamera.yGradientLoc = 1f |
The influence of the target's position on Y-axis movement, if lockYLocAxis = False
CameraLocConstrainType AC.GameCamera.yLocConstrainType = CameraLocConstrainType.TargetHeight |
The constrain type on Y-axis movement, if lockYLocAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)
float AC.GameCamera.yOffset = 0f |
The spin rotation offset, if lockYRotAxis = False
float AC.GameCamera.yOffsetLoc = 0f |
The Y-axis position offset, if lockYLocAxis = False
CameraRotConstrainType AC.GameCamera.yRotConstrainType |
The constrain type on spin rotation, if lockYRotAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, LookAtTarget)
float AC.GameCamera.zFreedom = 2f |
The track freedom along the Z-axis, if zLocConstrainType = CameraLocConstrainType.SideScrolling
float AC.GameCamera.zGradient = 1f |
The influence of the target's position on Z-axis movement, if lockZLocAxis = False
CameraLocConstrainType AC.GameCamera.zLocConstrainType |
The constrain type on Z-axis movement, if lockZLocAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)
float AC.GameCamera.zOffset = 0f |
The Z-axis position offset, if lockZLocAxis = False