Feel  5.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMAim Class Reference

Public Types

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

Public Member Functions

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

Public Attributes

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

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: