- Namespace
- Atavism
- Base Types
-
- MonoBehaviour
- Atavism
Input Controller
graph BT
Type-->Base0["AtavismInputController"]
click Base0 "/docs/client_api_10.4.0/api/Atavism/AtavismInputController"
Base0-->Base1["MonoBehaviour"]
Type["Atavism3rdPersonInput"]
class Type type-node
Syntax
public class Atavism3rdPersonInput : AtavismInputController
Fields
Name | Constant Value | Summary |
---|---|---|
cameraDist | ||
cameraFirstPerson | ||
cameraGrabbed |
Inherited from Atavism
|
|
cameraMaxDist | ||
cameraMinDist | ||
cameraTargetOffset | ||
groundLayers | ||
head |
||
idealPitch | ||
input |
Inherited from Atavism
|
|
maxPitch | ||
minPitch | ||
mouseLookLocked |
This variable allows me to lock the interface to mouse look mode.
Essentially, this treats the interface as though the right mouse
button is down all the time for purposes of the camera updates.
The movement still follows
|
|
MouseVelocity | ||
mouseWheelDisabled |
Inherited from Atavism
|
|
MouseWheelVelocity | ||
movement | ||
obstacleLayers | ||
rotateCameraSpeed | ||
rotateSpeed | ||
sdeTarget | ||
target |
Inherited from Atavism
|
|
walk |
Properties
Name | Value | Summary |
---|---|---|
CameraGrabbed | bool |
Inherited from Atavism
|
CameraPitch | float | |
CameraYaw | float | |
Input |
bool |
Inherited from Atavism
|
IsControllable | bool | |
IsMovingBack | bool | |
MouseWheelDisabled | bool |
Inherited from Atavism
|
PlayerYaw | float | |
Target | Transform |
Inherited from Atavism
|
Methods
Name | Value | Summary |
---|---|---|
ApplyMouseToCamera |
void |
Use the information from the mouse movement to update the camera.
|
Find |
float | |
GetPlayerMovement |
Vector3 | |
HandleImmediateKeys |
void |
Handle the keyboard and mouse input for movement of the player and camera.
This method name says immediate, but really it is acting on a keyboard state
that may have been filled in by buffered or immediate input.
|
IsMouseLook |
bool | |
MoveBackward |
void | |
MoveDown |
void | |
MoveForward |
void | |
MoveUp |
void | |
NoMove |
void | |
OnEvent |
void | |
RunCameraUpdate |
void | |
Shake |
void | |
StrafeLeft |
void | |
StrafeRight |
void | |
ToggleAutorun |
void | |
TurnLeft |
void | |
TurnRight |
void | |
UpdateCamera |
void |
This is called from the MouseMoved handler. It updates the
cameraPitch, cameraYaw and cameraDist variables (which are
later used to modify the camera). It may also update the
PlayerYaw.
|
UpdateCamera |
void |
Move the camera based on the new position of the camera target (player)
|
Update |
void |