質問編集履歴

3

コード追加

2020/03/17 10:21

投稿

nakamu
nakamu

スコア82

test CHANGED
File without changes
test CHANGED
@@ -311,3 +311,57 @@
311
311
 
312
312
 
313
313
  ```
314
+
315
+ ```C#
316
+
317
+ void Update()
318
+
319
+ {
320
+
321
+
322
+
323
+ if (Input.touchCount > 0 && !flg)
324
+
325
+ {
326
+
327
+ var touch = Input.GetTouch(0);
328
+
329
+ var hitResults = new List<ARRaycastHit>();
330
+
331
+ if (raycastManager.Raycast(touch.position, hitResults))
332
+
333
+ {
334
+
335
+
336
+
337
+ unitychan = objectPrefab;
338
+
339
+ unitychan = Instantiate(objectPrefab, hitResults[0].pose.position, Quaternion.identity);
340
+
341
+
342
+
343
+ var size = unitychan.transform.localScale;
344
+
345
+ unitychan.transform.localScale = new Vector3(size.x * 0.7f, size.y * 0.7f, size.z * 0.7f);
346
+
347
+
348
+
349
+ unitychan.AddComponent<LocomotionPlayer>();
350
+
351
+ LocomotionPlayer locomotionPlayer = unitychan.GetComponent<LocomotionPlayer>();
352
+
353
+ locomotionPlayer.arCamera = arcamera;
354
+
355
+
356
+
357
+ flg = true;
358
+
359
+ }
360
+
361
+
362
+
363
+ }
364
+
365
+ }
366
+
367
+ ```

2

画像添付

2020/03/17 10:21

投稿

nakamu
nakamu

スコア82

test CHANGED
File without changes
test CHANGED
@@ -12,6 +12,14 @@
12
12
 
13
13
 
14
14
 
15
+ ![イメージ説明](ddc9d6acece668491f9e8b888597fbc1.png)
16
+
17
+
18
+
19
+ ![イメージ説明](132764f790502b193ae941402fae6707.png)
20
+
21
+
22
+
15
23
  ```C#
16
24
 
17
25
  using System.Collections;

1

画像添付

2020/03/17 10:15

投稿

nakamu
nakamu

スコア82

test CHANGED
File without changes
test CHANGED
@@ -8,6 +8,10 @@
8
8
 
9
9
 
10
10
 
11
+ ![イメージ説明](1821c5169d256a3ed7819a2a2585c7e4.png)
12
+
13
+
14
+
11
15
  ```C#
12
16
 
13
17
  using System.Collections;