mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2026-03-29 01:56:43 +00:00
mass commit of laziness
This commit is contained in:
parent
ce992c70ee
commit
6d4fc549d9
167 changed files with 5471 additions and 675 deletions
|
|
@ -4,10 +4,24 @@ namespace ABI_RC.Core.Player.Interaction.RaycastImpl
|
|||
{
|
||||
public class CVRPlayerRaycasterMouse : CVRPlayerRaycaster
|
||||
{
|
||||
private readonly Camera _camera;
|
||||
#region Constructor
|
||||
|
||||
public CVRPlayerRaycasterMouse(Transform rayOrigin, Camera camera) : base(rayOrigin) { _camera = camera; }
|
||||
|
||||
private readonly Camera _camera;
|
||||
|
||||
#endregion Constructor
|
||||
|
||||
#region Overrides
|
||||
|
||||
protected override Ray GetRayFromImpl() => Cursor.lockState == CursorLockMode.Locked
|
||||
? new Ray(_camera.transform.position, _camera.transform.forward)
|
||||
: _camera.ScreenPointToRay(Input.mousePosition);
|
||||
|
||||
protected override Ray GetProximityRayFromImpl() => Cursor.lockState == CursorLockMode.Locked
|
||||
? new Ray(_camera.transform.position, _camera.transform.forward)
|
||||
: _camera.ScreenPointToRay(Input.mousePosition);
|
||||
|
||||
#endregion Overrides
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue