angle raycaster down

This commit is contained in:
Kevin Ngo
2018-10-16 01:31:59 -07:00
parent c6bcf6d6ad
commit 109a6743e2
4 changed files with 49 additions and 14 deletions

View File

@@ -143,7 +143,7 @@
<!-- Player. -->
<a-mixin
id="raycaster"
raycaster="objects: [raycastable]; far: 3"
raycaster="objects: [raycastable]; far: 3; showLine: false"
line="opacity: 0.75"></a-mixin>
<a-mixin
id="cursorMesh"
@@ -177,10 +177,14 @@
trail="color: {{ bladeColor }}; hand: {{ hand }}">
<a-entity
id="{{ hand }}Laser"
bind__visible="menuActive && activeHand === '{{ hand }}'"
cursor-laser="hand: {{ hand }}"
sub-object="from: #cursorLaser; name: beam"
material="color: {{ beamColor }}; shader: flat; transparent: true; opacity: 0.04"></a-entity>
class="laser"
bind__visible="menuActive && activeHand === '{{ hand }}'">
<a-entity
class="laserMesh"
cursor-laser="hand: {{ hand }}"
sub-object="from: #cursorLaser; name: beam"
material="color: {{ beamColor }}; shader: flat; transparent: true; opacity: 0.04"></a-entity>
</a-entity>
<a-entity class="saberContainer" rotation="90 0 0">
<a-entity
@@ -237,12 +241,12 @@
{% if not IS_PRODUCTION %}
<a-entity id="mouseCursor" mixin="raycaster" cursor="rayOrigin: mouse"
bind__raycaster="enabled: !inVR" raycaster="showLine: false"></a-entity>
bind__raycaster="enabled: !inVR"></a-entity>
<a-entity id="mouseCursorMesh" mixin="cursorMesh" cursor-mesh="cursorEl: #mouseCursor"
bind__cursor-mesh="active: menuActive"></a-entity>
{% endif %}
</a-scene>
<a id="vrButton" href="#" title="Enter VR / Fullscreen"></a>
</body>
</html>