Adventure Creator  1.68.0
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.PlayerMovement Class Reference
Inheritance diagram for AC.PlayerMovement:

Public Member Functions

void OnStart ()
 
void UpdateFPCamera ()
 
Transform AssignFPCamera ()
 ssigns the first-person camera as the FirstPersonCamera component placed as a child component on the Player preab. More...
 
void UpdatePlayerMovement ()
 
Vector3 ClickPoint (Vector2 screenPosition, bool onNavMesh=false)
 Gets the point in world space that a point in screen space is above. More...
 

Detailed Description

This script analyses the variables in PlayerInput, and moves the character based on the control style, defined in the SettingsManager. It should be placed on the GameEngine prefab.

Member Function Documentation

◆ AssignFPCamera()

Transform AC.PlayerMovement.AssignFPCamera ( )

ssigns the first-person camera as the FirstPersonCamera component placed as a child component on the Player preab.

A

Returns
The Transform of the FirstPersonCamera component, if one is present on the Player.

◆ ClickPoint()

Vector3 AC.PlayerMovement.ClickPoint ( Vector2  screenPosition,
bool  onNavMesh = false 
)

Gets the point in world space that a point in screen space is above.

Parameters
screenPositionThe position in screen space
Parameters
onNavMeshIf True, then only objects placed on the NavMesh layer will be detected.
Returns
The point in world space that a point in screen space is above

◆ UpdateFPCamera()

void AC.PlayerMovement.UpdateFPCamera ( )

Updates the first-person camera, if appropriate. This is called every frame by StateHandler.

◆ UpdatePlayerMovement()

void AC.PlayerMovement.UpdatePlayerMovement ( )

Updates the movement handler. This is called every frame by StateHandler.