Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.MMAim Class Reference

Public Types

enum  AimControls {
  Off , PrimaryMovement , SecondaryMovement , Mouse ,
  Script
}
 the list of possible control modes . More...
enum  RotationModes { Free , Strict4Directions , Strict8Directions }
 the list of possible rotation modes More...

Public Member Functions

virtual void Initialization ()
 Grabs the weapon component, initializes the angle values.
virtual Vector2 GetCurrentAim ()
 Computes the current aim direction.
virtual void SetAim (Vector2 newAim)
 Use this method to set the aim when in AimControl mode : Script.

Public Attributes

AimControls AimControl = AimControls.SecondaryMovement
 the aim control mode
RotationModes RotationMode = RotationModes.Free
 the rotation mode
float MinimumAngle = -180f
 the minimum angle at which the weapon's rotation will be clamped
float MaximumAngle = 180f
 the maximum angle at which the weapon's rotation will be clamped
float CurrentAngle
 the current angle the weapon is aiming at

Protected Attributes

float[] _possibleAngleValues
Vector3 _currentAim = Vector3.zero
Vector3 _direction
Vector3 _mousePosition
Vector2 _inputSystemMousePosition
Camera _mainCamera

Properties

virtual Vector3 CurrentPosition [get, set]
virtual Vector2 PrimaryMovement [get, set]
virtual Vector2 SecondaryMovement [get, set]

Member Enumeration Documentation

◆ AimControls

the list of possible control modes .

Enumerator
Off 
PrimaryMovement 
SecondaryMovement 
Mouse 
Script 

◆ RotationModes

the list of possible rotation modes

Enumerator
Free 
Strict4Directions 
Strict8Directions 

Member Function Documentation

◆ GetCurrentAim()

virtual Vector2 MoreMountains.Tools.MMAim.GetCurrentAim ( )
virtual

Computes the current aim direction.

◆ Initialization()

virtual void MoreMountains.Tools.MMAim.Initialization ( )
virtual

Grabs the weapon component, initializes the angle values.

◆ SetAim()

virtual void MoreMountains.Tools.MMAim.SetAim ( Vector2 newAim)
virtual

Use this method to set the aim when in AimControl mode : Script.

Parameters
newAim

Member Data Documentation

◆ _currentAim

Vector3 MoreMountains.Tools.MMAim._currentAim = Vector3.zero
protected

◆ _direction

Vector3 MoreMountains.Tools.MMAim._direction
protected

◆ _inputSystemMousePosition

Vector2 MoreMountains.Tools.MMAim._inputSystemMousePosition
protected

◆ _mainCamera

Camera MoreMountains.Tools.MMAim._mainCamera
protected

◆ _mousePosition

Vector3 MoreMountains.Tools.MMAim._mousePosition
protected

◆ _possibleAngleValues

float [] MoreMountains.Tools.MMAim._possibleAngleValues
protected

◆ AimControl

AimControls MoreMountains.Tools.MMAim.AimControl = AimControls.SecondaryMovement

the aim control mode

◆ CurrentAngle

float MoreMountains.Tools.MMAim.CurrentAngle

the current angle the weapon is aiming at

◆ MaximumAngle

float MoreMountains.Tools.MMAim.MaximumAngle = 180f

the maximum angle at which the weapon's rotation will be clamped

◆ MinimumAngle

float MoreMountains.Tools.MMAim.MinimumAngle = -180f

the minimum angle at which the weapon's rotation will be clamped

◆ RotationMode

RotationModes MoreMountains.Tools.MMAim.RotationMode = RotationModes.Free

the rotation mode

Property Documentation

◆ CurrentPosition

virtual Vector3 MoreMountains.Tools.MMAim.CurrentPosition
getset

◆ PrimaryMovement

virtual Vector2 MoreMountains.Tools.MMAim.PrimaryMovement
getset

◆ SecondaryMovement

virtual Vector2 MoreMountains.Tools.MMAim.SecondaryMovement
getset

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