![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | SetTarget (Transform target) |
void | SetLookAtOverride (Transform lookAtOverride, float transitionTime) |
void | ClearLookAtOverride (float transitionTime=0f) |
bool | IsLookAtInfluenceComplete () |
void | SnapToCurrentCamera (bool fromRelativePosition=false) |
void | SnapToCurrentCameraSpin (float newPitchAngle=10f) |
void | SnapToDirection (Vector3 forward, Vector3 right) |
void | SnapToRotation (float newSpinAngle, float newPitchAngle, bool spinIsRelativeToTarget=false) |
void | SnapBehindTarget (float newDistance=0f) |
Vector2 | GenerateTargetAngles (Transform transform) |
void | BeginAutoMove (float speed, Vector2 targetAngles, bool relativeToTarget) |
bool | IsAutoMoving () |
void | SetInitialDirection () |
void | ShowGUI () |
![]() | |
virtual 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... | |
virtual void | SwitchTarget (Transform _target) |
Switches the camera's target. More... | |
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 | _Update () |
virtual void | ResetTarget () |
virtual void | MoveCameraInstant () |
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 | |
string | spinAxis = "CursorHorizontal" |
string | pitchAxis = "CursorVertical" |
bool | requireLockedCursor = false |
bool | allowCutsceneControl = false |
bool | allowConversationControl = false |
Vector2 | intialDirectionAngles = Vector2.zero |
InitialDirection | initialDirection = InitialDirection.BehindTarget |
bool | initialOnSwitch = false |
Vector2 | inputInfluence = new Vector2 (3f, 3f) |
Vector2 | maxInput = new Vector2 (3f, 3f) |
float | fastDistanceFactor = 2f |
float | distanceAcceleration = 5f |
float | distanceInfluenceAcceleration = 10f |
bool | targetMovementInfluencesSpin = true |
float | targetSpinAcceleration = 2f |
float | targetSpinInfluence = 1f |
float | targetSpinDelay = 2f |
float | edgeCurvature = 0f |
bool | targetMovementInfluencesPitch = true |
float | targetPitchInfluence = 1f |
float | targetPitchRestAngle = 0f |
float | pitchAcceleration = 8f |
float | minPitch = -80f |
float | maxPitch = 80f |
bool | doLimitSpin = false |
float | minSpin = -80f |
float | maxSpin = 80f |
float | spinLimitOffset = 0f |
float | spinAcceleration = 8f |
float | heightOffset = 0f |
float | horizontalOffset = 0f |
bool | detectCollisions = true |
LayerMask | collisionLayerMask = new LayerMask () |
float | minimumDistance = 0.2f |
float | wallSeparator = 0.1f |
float | heightChangeInfluenceLimit = 10f |
float | maxRaycastDistance = 5f |
float | zoomLimit = 0.5f |
string | zoomAxis = "Mouse ScrollWheel" |
float | zoomSpeed = 1f |
ZoomMethod | zoomMethod = ZoomMethod.None |
Vector2 | inputSmoothing = new Vector2 (0.3f, 0.3f) |
bool | focalPointIsTarget = true |
![]() | |
bool | targetIsPlayer = true |
Transform | target |
bool | isDragControlled = false |
float | focalDistance = 10f |
Protected Member Functions | |
override void | OnEnable () |
override void | OnDisable () |
override void | Start () |
![]() | |
virtual void | Awake () |
Vector3 | PositionRelativeToCamera (Vector3 _position) |
Vector3 | RightVector () |
Vector3 | ForwardVector () |
float | ConstrainAxis (float desired, Vector2 range, bool isAngle=false) |
Properties | |
float | SpinAngle [get] |
float | PitchAngle [get] |
Transform | LookAtOverride [get] |
![]() | |
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] |
Additional Inherited Members | |
![]() | |
Char | targetChar |
Camera | _camera |
Vector2 | inputMovement |
bool | is2D = false |
bool AC.GameCameraThirdPerson.allowConversationControl = false |
If True, then spin and pitch can be altered when a Conversation is active
bool AC.GameCameraThirdPerson.allowCutsceneControl = false |
If True, then spin and pitch can be altered when gameplay is blocked
LayerMask AC.GameCameraThirdPerson.collisionLayerMask = new LayerMask () |
The LayerMask used to detect collisions, if detectCollisions = True
bool AC.GameCameraThirdPerson.detectCollisions = true |
If True, then the camera will detect Colliders to try to avoid clipping through walls
float AC.GameCameraThirdPerson.distanceAcceleration = 5f |
Acceleration when changing distance
float AC.GameCameraThirdPerson.distanceInfluenceAcceleration = 10f |
The acceleration when changing distance due to the target's speed
bool AC.GameCameraThirdPerson.doLimitSpin = false |
If True, then the spin angle is constrained
float AC.GameCameraThirdPerson.edgeCurvature = 0f |
The amount of curvature in the corners when the spin angle is constrained
float AC.GameCameraThirdPerson.fastDistanceFactor = 2f |
How much that target's speed influences distance
bool AC.GameCameraThirdPerson.focalPointIsTarget = true |
If True, then focalDistance will match the distance to target
float AC.GameCameraThirdPerson.heightChangeInfluenceLimit = 10f |
The limit to which changes in the target's height influence the pitch angle
float AC.GameCameraThirdPerson.heightOffset = 0f |
The global offset to apply to all height values
float AC.GameCameraThirdPerson.horizontalOffset = 0f |
An offset to apply to the camera's horizontal position. The Camera must be a child of this component for the effect to work
InitialDirection AC.GameCameraThirdPerson.initialDirection = InitialDirection.BehindTarget |
How to set the original direction (BehindTarget, PreviousCameraSpin, PreviousCameraDirection, PreviousCameraRelativePosition, SetAngles, None)
bool AC.GameCameraThirdPerson.initialOnSwitch = false |
If True, the camera will revert to its initial direction each time it is switched to
Vector2 AC.GameCameraThirdPerson.inputInfluence = new Vector2 (3f, 3f) |
The influence that input has on motion (X = spin, Y = pitch)
Vector2 AC.GameCameraThirdPerson.inputSmoothing = new Vector2 (0.3f, 0.3f) |
The factor by which the camera accelerates due to input
Vector2 AC.GameCameraThirdPerson.intialDirectionAngles = Vector2.zero |
The direction to face by default
Vector2 AC.GameCameraThirdPerson.maxInput = new Vector2 (3f, 3f) |
The maximum amount of input per-frame (X = spin, Y = pitch)
float AC.GameCameraThirdPerson.maxPitch = 80f |
The maximum pitch angle
float AC.GameCameraThirdPerson.maxRaycastDistance = 5f |
The distance of rays used to detect collisions
float AC.GameCameraThirdPerson.maxSpin = 80f |
The maximum spin angle, if doLimitSpin = True
float AC.GameCameraThirdPerson.minimumDistance = 0.2f |
The minimum distance to keep from its target, if detectCollisions = True
float AC.GameCameraThirdPerson.minPitch = -80f |
The minimum pitch angle
float AC.GameCameraThirdPerson.minSpin = -80f |
The minimum spin angle, if doLimitSpin = True
float AC.GameCameraThirdPerson.pitchAcceleration = 8f |
The acceleration of pitch rotations
string AC.GameCameraThirdPerson.pitchAxis = "CursorVertical" |
The name of the Input axis that controls pitch rotation, if isDragControlled = False
bool AC.GameCameraThirdPerson.requireLockedCursor = false |
If true, then the cursor must be locked before input will take effect
float AC.GameCameraThirdPerson.spinAcceleration = 8f |
The acceleration of spin rotations
string AC.GameCameraThirdPerson.spinAxis = "CursorHorizontal" |
The name of the Input axis that controls spin rotation, if isDragControlled = False
bool AC.GameCameraThirdPerson.targetMovementInfluencesPitch = true |
If True, the target's movement influenced the pitch angle
bool AC.GameCameraThirdPerson.targetMovementInfluencesSpin = true |
If True, the target's movement influenced the spin angle
float AC.GameCameraThirdPerson.targetPitchInfluence = 1f |
The amount by which the target's movement influences the pitch angle
float AC.GameCameraThirdPerson.targetPitchRestAngle = 0f |
The pitch angle to move towards when influenced by the target's movement
float AC.GameCameraThirdPerson.targetSpinDelay = 2f |
How long the target can move before they influence the spin angle
float AC.GameCameraThirdPerson.targetSpinInfluence = 1f |
The amount by which the target's movement influences the spin angle
float AC.GameCameraThirdPerson.wallSeparator = 0.1f |
The distance to keep from walls, if detectCollisions = True;
string AC.GameCameraThirdPerson.zoomAxis = "Mouse ScrollWheel" |
The axis that controls zooming
float AC.GameCameraThirdPerson.zoomLimit = 0.5f |
The lower relative limit to zooming
ZoomMethod AC.GameCameraThirdPerson.zoomMethod = ZoomMethod.None |
The method by which to allow zooming (None, AxisControlsDistance, ButtonControlsFOV)
float AC.GameCameraThirdPerson.zoomSpeed = 1f |
The speed of zooming