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

A more advanced type of AVR_Ray. The ray can be used to get the first object hit by it. To limit collidable objects by certain types, use AVR_SolidRay.passThrough_layerMask. More...

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

Public Attributes

LayerMask hit_layerMask
 Layermask used to selectively ignore colliders when casting a ray. More...
 
- Public Attributes inherited from AVR.Core.AVR_Ray
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 UpdateRay ()
 Updates the ray. Called from Monobehaviour.Update() More...
 
override void UpdateStraightRay ()
 Updates a ray with mode==STRAIGHT More...
 
override void UpdateProjectileRay ()
 Updates a ray with mode==PROJECTILE More...
 
- Protected Member Functions inherited from AVR.Core.AVR_Ray
override void Awake ()
 
virtual void Update ()
 
- Protected Member Functions inherited from AVR.Core.AVR_Component
virtual void Start ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Properties

RaycastHit hitPosition [get]
 Raycasthit where the ray hit something. Contains the last hit the ray did if AVR_SolidRay.objectHit is false. null if the ray hasn't hit a single object in its lifetime. /summary> More...
 
bool objectHit [get]
 True if the ray hit some object this frame. Use AVR_SolidRay.hitPosition to get the respective RaycastHit. More...
 
- Properties inherited from AVR.Core.AVR_Ray
bool isVisible [get]
 Is this ray visible More...
 
bool isHidden [get]
 Is this ray hidden More...
 

Private Member Functions

bool checkHit (List< Vector3 > positions)
 
bool checkHit (Vector3[] positions)
 

Private Attributes

RaycastHit _hitPosition
 
bool _objectHit
 

Additional Inherited Members

- Public Types inherited from AVR.Core.AVR_Ray
enum  RayMode { RayMode.STRAIGHT, RayMode.PROJECTILE_MOTION }
 
- Public Member Functions inherited from AVR.Core.AVR_Ray
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 ()
 
- Protected Attributes inherited from AVR.Core.AVR_Ray
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...
 

Detailed Description

A more advanced type of AVR_Ray. The ray can be used to get the first object hit by it. To limit collidable objects by certain types, use AVR_SolidRay.passThrough_layerMask.

Definition at line 12 of file AVR_SolidRay.cs.