C# Класс OrbitCamera, Poker

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
distance float
maxDistance float
maxDistanceSpeed float
minDistance float
minDistanceSpeed float
shiftKeyModifier float
speed float
target Transform
zoomSpeed float

Открытые методы

Метод Описание
LateUpdate ( ) : void

Handles the orbiting

SetCamera ( ) : void

Sets the camera position based on current attributes

SetOrbitPoint ( float xAngle, float yAngle, float distance ) : void

Sets the angles and distance for the object

SetOrbitPosition ( Vector3 position, Vector3 up ) : void

Sets the orbit camera to a particular position and has it look at the target using the given up axis

Setup ( ) : void

Sets the script up with the current transform's angles

Start ( ) : void

Calls the setup method on startup

Описание методов

LateUpdate() публичный Метод

Handles the orbiting
public LateUpdate ( ) : void
Результат void

SetCamera() публичный Метод

Sets the camera position based on current attributes
public SetCamera ( ) : void
Результат void

SetOrbitPoint() публичный Метод

Sets the angles and distance for the object
public SetOrbitPoint ( float xAngle, float yAngle, float distance ) : void
xAngle float
yAngle float
distance float
Результат void

SetOrbitPosition() публичный Метод

Sets the orbit camera to a particular position and has it look at the target using the given up axis
public SetOrbitPosition ( Vector3 position, Vector3 up ) : void
position Vector3 The position to set the camera to
up Vector3 The axis to use at the 'up axis' when looking at the target
Результат void

Setup() публичный Метод

Sets the script up with the current transform's angles
public Setup ( ) : void
Результат void

Start() публичный Метод

Calls the setup method on startup
public Start ( ) : void
Результат void

Описание свойств

distance публичное свойство

The distance of the orbit from the target
public float distance
Результат float

maxDistance публичное свойство

The maximum amount the camera can Distance
public float maxDistance
Результат float

maxDistanceSpeed публичное свойство

The Distance speed when the camera is at its max Distance level
public float maxDistanceSpeed
Результат float

minDistance публичное свойство

The minimum amount a camera can Distance
public float minDistance
Результат float

minDistanceSpeed публичное свойство

The Distance speed when the camera is at its min Distance level
public float minDistanceSpeed
Результат float

shiftKeyModifier публичное свойство

Amount to increase speed of actions when shift is held down
public float shiftKeyModifier
Результат float

speed публичное свойство

The speed at which to orbit based on mouse input
public float speed
Результат float

target публичное свойство

The transform to orbit
public Transform target
Результат Transform

zoomSpeed публичное свойство

The zoom speed
public float zoomSpeed
Результат float