VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
AVR.Core.AVR_Ray Class Reference

Base class for a ray. A ray is always cast in transform.forward direction of the object it is attatched to. Rays of this type do not collide with any objects and pass through everything. Use AVR_SolidRay if collisions are required. More...

Inheritance diagram for AVR.Core.AVR_Ray:
AVR.Core.AVR_Component AVR.Core.AVR_Behaviour AVR.Core.AVR_SolidRay AVR.UI.AVR_UIRay AVR.Motion.AVR_MovementRay

Public Types

enum  RayMode { RayMode.STRAIGHT, RayMode.PROJECTILE_MOTION }
 

Public Member Functions

virtual void hide ()
 Hides the ray. A ray is not updated while hidden. More...
 
virtual void show ()
 Shows the ray. A ray is not updated while hidden. More...
 
virtual void setHidden (bool hidden)
 Set the hidden status of the ray More...
 
- Public Member Functions inherited from AVR.Core.AVR_Behaviour
virtual void OnDestroy ()
 

Public Attributes

RayMode mode = RayMode.STRAIGHT
 What type of ray should be used More...
 
int proj_resolution = 3
 How many vertices per unit distance to use for projectile motion ray More...
 
float proj_max_verts = 150
 Max. amount of vertices to use for projectile motion ray More...
 
float proj_velocity = 3
 Starting velocity of the projectile motion More...
 
bool start_hidden = true
 Hide or show the ray immediately on Awake() More...
 
float max_length = 25
 Maximum length of the ray More...
 
float max_horizontal_distance = 10
 Will restrict the length of the ray along the xz-Plane to a given value. More...
 
float min_y_angle = 0
 Will restrict the minium angle of the Ray with the y-Axis. More...
 
- Public Attributes inherited from AVR.Core.AVR_Component
UnityEngine.Events.UnityEvent onAwake
 Events called when this component awakes. More...
 
UnityEngine.Events.UnityEvent onStart
 Events called when this component starts. More...
 
UnityEngine.Events.UnityEvent onEnable
 Events called when this component is enabled. More...
 
UnityEngine.Events.UnityEvent onDisable
 Events called when this component is disabled. More...
 

Protected Member Functions

override void Awake ()
 
virtual void Update ()
 
virtual void UpdateRay ()
 Updates the ray. Called from Monobehaviour.Update() More...
 
virtual void UpdateStraightRay ()
 Updates a ray with mode==STRAIGHT More...
 
virtual void UpdateProjectileRay ()
 Updates a ray with mode==PROJECTILE More...
 
- Protected Member Functions inherited from AVR.Core.AVR_Component
virtual void Start ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Protected Attributes

LineRenderer lr
 
bool _hidden
 
Vector3[] positions = new Vector3[0]
 
Vector3 RayForward = Vector3.forward
 
- Protected Attributes inherited from AVR.Core.AVR_Behaviour
AVR_PlayerRig playerRig => AVR_PlayerRig.Instance
 The current AVR_PlayerRig instance in the scene More...
 
AVR_Root root => AVR_Root.Instance
 The current AVR_Root instance in the scene More...
 
bool vrEnabled => UnityEngine.XR.XRSettings.enabled
 True if the application is running as a VR/XR application More...
 

Properties

bool isVisible [get]
 Is this ray visible More...
 
bool isHidden [get]
 Is this ray hidden More...
 

Detailed Description

Base class for a ray. A ray is always cast in transform.forward direction of the object it is attatched to. Rays of this type do not collide with any objects and pass through everything. Use AVR_SolidRay if collisions are required.

Definition at line 13 of file AVR_Ray.cs.