Skip to content

Commit 5545c04

Browse files
committed
Add a camera rig to set the user height. look-controls is no longer resposinble of implicitely setting the user height or if a camera is non VR, or a VR sitting or standing experience. It is up to the
content creator to build a camera rig that sets the user height as appropriate. The examples have been updated to reflect this change (fix #3315, #3118, #3051, #2487)
1 parent dffb77c commit 5545c04

File tree

14 files changed

+29157
-143
lines changed

14 files changed

+29157
-143
lines changed

‎examples/showcase/tracked-controls/index.html‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@
2525
event-set__mouseup="material.color: #F2E646"
2626
geometry="primitive: box; height: 0.30; width: 0.30; depth: 0.30"
2727
material="color: #EF2D5E;"></a-mixin>
28+
<a-asset-item id="mask" src="mask.obj"></a-asset-item>
29+
<a-asset-item id="maskmtl" src="mask.mtl"></a-asset-item>
2830
</a-assets>
2931

30-
<!-- Hands -->
31-
<a-entity hand-controls="left" aabb-collider="objects: .cube;" grab></a-entity>
32-
<a-entity hand-controls="right" aabb-collider="objects: .cube;" grab></a-entity>
33-
3432
<!-- A-Frame cubes -->
3533
<a-entity position="0 0 -0.5">
3634
<a-entity class="cube" mixin="cube" position="0.30 1.65 0"></a-entity>
@@ -62,8 +60,15 @@
6260
<a-entity light="type: point; color: #f4f4f4; intensity: 0.6; distance: 0" position="-8 10 -18"></a-entity>
6361
<a-entity light="type: ambient; color: #f4f4f4; intensity: 0.4;" position="-8 10 -18"></a-entity>
6462
</a-entity>
65-
<a-camera></a-camera>
66-
63+
<a-entity position="0 1.6 0">
64+
<a-camera><a-entity obj-model=" obj: #mask; mtl: #maskmtl" scale="0.8 0.8 0.8"></a-entity></a-camera>
65+
<!-- Hands -->
66+
<a-entity vive-controls="hand: left; model: false" aabb-collider="objects: .cube;" grab>
67+
<a-entity camera="spectator: true" rotation="0 180 0"></a-entity>
68+
<a-entity viewfinder></a-entity>
69+
</a-entity>
70+
<a-entity hand-controls="right" aabb-collider="objects: .cube;" grab></a-entity>
71+
</a-entity>
6772
</a-scene>
6873
</body>
6974
</html>
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
newmtl mat0
2+
Ka 0.73 0.41 0.78
3+
Kd 0.73 0.41 0.78
4+
5+
newmtl mat1
6+
Ka 0.61 0.15 0.69
7+
Kd 0.61 0.15 0.69
8+
9+
newmtl mat2
10+
Ka 0.40 0.23 0.72
11+
Kd 0.40 0.23 0.72
12+
13+
newmtl mat3
14+
Ka 0.50 0.87 0.92
15+
Kd 0.50 0.87 0.92
16+
17+
newmtl mat4
18+
Ka 0.00 0.74 0.83
19+
Kd 0.00 0.74 0.83
20+
21+
newmtl mat5
22+
Ka 0.01 0.61 0.90
23+
Kd 0.01 0.61 0.90
24+
25+
newmtl mat6
26+
Ka 0.97 0.73 0.82
27+
Kd 0.97 0.73 0.82
28+
29+
newmtl mat7
30+
Ka 0.94 0.38 0.57
31+
Kd 0.94 0.38 0.57
32+
33+
newmtl mat8
34+
Ka 0.96 0.26 0.21
35+
Kd 0.96 0.26 0.21
36+
37+
newmtl mat9
38+
Ka 0.55 0.76 0.29
39+
Kd 0.55 0.76 0.29
40+
41+
newmtl mat10
42+
Ka 0.30 0.69 0.31
43+
Kd 0.30 0.69 0.31
44+
45+
newmtl mat11
46+
Ka 0.00 0.59 0.53
47+
Kd 0.00 0.59 0.53
48+
49+
newmtl mat12
50+
Ka 1.00 0.92 0.23
51+
Kd 1.00 0.92 0.23
52+
53+
newmtl mat13
54+
Ka 1.00 0.60 0.00
55+
Kd 1.00 0.60 0.00
56+
57+
newmtl mat14
58+
Ka 1.00 0.34 0.13
59+
Kd 1.00 0.34 0.13
60+
61+
newmtl mat15
62+
Ka 0.81 0.85 0.86
63+
Kd 0.81 0.85 0.86
64+
65+
newmtl mat16
66+
Ka 0.47 0.56 0.61
67+
Kd 0.47 0.56 0.61
68+
69+
newmtl mat17
70+
Ka 0.27 0.35 0.39
71+
Kd 0.27 0.35 0.39
72+
73+
newmtl mat18
74+
Ka 1.00 0.80 0.53
75+
Kd 1.00 0.80 0.53
76+
77+
newmtl mat19
78+
Ka 0.87 0.60 0.27
79+
Kd 0.87 0.60 0.27
80+
81+
newmtl mat20
82+
Ka 0.47 0.33 0.28
83+
Kd 0.47 0.33 0.28
84+
85+
newmtl mat21
86+
Ka 1.00 1.00 1.00
87+
Kd 1.00 1.00 1.00
88+
89+
newmtl mat22
90+
Ka 0.62 0.62 0.62
91+
Kd 0.62 0.62 0.62
92+
93+
newmtl mat23
94+
Ka 0.10 0.10 0.10
95+
Kd 0.10 0.10 0.10
96+
97+
newmtl mat24
98+
Ka 0.58 0.65 1.00
99+
Kd 0.92 0.95 0.94
100+
Ks 1 1 1
101+
illum 4
102+
Ns 300
103+
d 0.4
104+
Ni 1.5
105+
106+
newmtl mat25
107+
Ka 1.00 0.65 0.67
108+
Kd 0.92 0.95 0.94
109+
Ks 1 1 1
110+
illum 4
111+
Ns 300
112+
d 0.4
113+
Ni 1.5
114+

0 commit comments

Comments
 (0)