Neuro-VISOR  0.2.0
Visualize and interact with computational simulations using a virtual reality interface
C2M2.Utils.MovementController Class Reference

Allow an object to be moved through keyboard controls More...

Inherits MonoBehaviour.

Public Member Functions

void EnableMovement ()
 
void DisableMovement ()
 

Public Attributes

KeyCode forwardKey = KeyCode.W
 
KeyCode backwardKey = KeyCode.S
 
KeyCode leftKey = KeyCode.A
 
KeyCode rightKey = KeyCode.D
 
KeyCode controlKey = KeyCode.LeftControl
 
bool limitPos = false
 
Vector3 maxPos = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity)
 
Vector3 minPos = new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity)
 
float speed = 0.1f
 
Transform relativeTo = null
 
float rotateSpeed = 5.0f
 

Properties

bool ForwardPress [get]
 
bool BackwardPress [get]
 
bool LeftPress [get]
 
bool RightPress [get]
 
bool ControlPress [get]
 
float ScrollWheel [get]
 
bool isMoving = false [get, private set]
 

Private Member Functions

IEnumerator Movement ()
 
void OnEnable ()
 
void OnDisable ()
 

Private Attributes

Coroutine moveRoutine = null
 
float x = 0.0f
 
float y = 0.0f
 

Detailed Description

Allow an object to be moved through keyboard controls

Member Function Documentation

◆ DisableMovement()

void C2M2.Utils.MovementController.DisableMovement ( )

◆ EnableMovement()

void C2M2.Utils.MovementController.EnableMovement ( )

◆ Movement()

IEnumerator C2M2.Utils.MovementController.Movement ( )
private

◆ OnDisable()

void C2M2.Utils.MovementController.OnDisable ( )
private

◆ OnEnable()

void C2M2.Utils.MovementController.OnEnable ( )
private

Member Data Documentation

◆ backwardKey

KeyCode C2M2.Utils.MovementController.backwardKey = KeyCode.S

◆ controlKey

KeyCode C2M2.Utils.MovementController.controlKey = KeyCode.LeftControl

◆ forwardKey

KeyCode C2M2.Utils.MovementController.forwardKey = KeyCode.W

◆ leftKey

KeyCode C2M2.Utils.MovementController.leftKey = KeyCode.A

◆ limitPos

bool C2M2.Utils.MovementController.limitPos = false

◆ maxPos

Vector3 C2M2.Utils.MovementController.maxPos = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity)

◆ minPos

Vector3 C2M2.Utils.MovementController.minPos = new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity)

◆ moveRoutine

Coroutine C2M2.Utils.MovementController.moveRoutine = null
private

◆ relativeTo

Transform C2M2.Utils.MovementController.relativeTo = null

◆ rightKey

KeyCode C2M2.Utils.MovementController.rightKey = KeyCode.D

◆ rotateSpeed

float C2M2.Utils.MovementController.rotateSpeed = 5.0f

◆ speed

float C2M2.Utils.MovementController.speed = 0.1f

◆ x

float C2M2.Utils.MovementController.x = 0.0f
private

◆ y

float C2M2.Utils.MovementController.y = 0.0f
private

Property Documentation

◆ BackwardPress

bool C2M2.Utils.MovementController.BackwardPress
getprivate

◆ ControlPress

bool C2M2.Utils.MovementController.ControlPress
getprivate

◆ ForwardPress

bool C2M2.Utils.MovementController.ForwardPress
getprivate

◆ isMoving

bool C2M2.Utils.MovementController.isMoving = false
getprivate set

◆ LeftPress

bool C2M2.Utils.MovementController.LeftPress
getprivate

◆ RightPress

bool C2M2.Utils.MovementController.RightPress
getprivate

◆ ScrollWheel

float C2M2.Utils.MovementController.ScrollWheel
getprivate

The documentation for this class was generated from the following file: