0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

vuforia 水平面検知 車を出す

Last updated at Posted at 2021-07-26

1, vuforiaをインポートし、ライセンスキーまで設定する

2, GroundPlanestageを作成する
750E692F-9F35-4D7E-85E6-68951AEF4BF9.jpeg

3, オブジェクトを作成し、子オブジェクトにする。サイズやマテリアルを設定する。
5076A3CC-78DC-4CAE-945A-28CDBCE2668C_4_5005_c.jpeg

4, Materialをテクスチャに変更する
CC84E003-A439-43EB-9E47-EE3B8ADA15E0.jpeg

5, PlaneFinderを作成する
E0EB1EAD-056A-4C2B-AAFA-DFB91785948F.jpeg

6, PlaneFinderのAnchorStageにGroundPlaneStageを設定する
39EA36F2-34B3-4C7F-A836-B3F58F6CCE48.jpeg

7, DuplocateStageのチェックを外すと1つのオブジェクトのみ設置することができる
D358862A-3EE6-45EB-AD6F-A1313E007BC5.jpeg

車の実装

1, 車を配置する

2、StandardSurfaceShaderを選択し、Shaderを作成する
566C8776-8F2B-4ECD-8CB9-447FB41B44DD_4_5005_c.jpeg

3、マテリアルを作成し、各名前を変更する
219D94E4-26DA-4FEC-91F6-72D978BEBC92_4_5005_c.jpeg

4、マテリアルのStandard→Custum→ARShadowを選択する
19FE55B5-413D-4D19-B3CE-70F7CB679036_4_5005_c.jpeg

5、ARShadowを、配置したPlaneにアタッチする
A02DB402-C289-4C11-A6E6-933CF07E1785_4_5005_c.jpeg

6、ShadowPlaneをCarの子オブジェクトにする
BD69A6F2-125D-4B01-BFE1-5AD1B22C86EB_4_5005_c.jpeg

7、ProjectSettingを開き、CloseFitにする
28F5BD28-D8EC-4B43-8695-E5CA542E0D5C.jpeg

8、ライトのStrengthを調整する
5733140D-F2B0-4F34-9381-B39CB523B794.jpeg

9、ProjectSettingを開き、IOS,アンドロイドのQualityを調整する
05BACA63-2227-4158-A69B-44B6DD0B7755.jpeg
0A90C123-3EE8-4C3D-8F91-F59F71898F95_4_5005_c.jpeg

10、ビルドする

ヘリコプターの実装

1、 MidAirStageを選択する
C873DA5E-01E6-4E89-9F72-9537C2A73130.jpeg

2、ヘリを子オブジェクトにして、位置とサイズを調整する
FB51DBB0-1D83-4C28-ADB2-7D483543DC4D.jpeg

3、MidAirPositionerを選択する
0B4DCD1B-803B-4CD7-904D-D886EC560F3C.jpeg

4、MidAirPositionerにMidAirStageをアタッチして、チェックを外す
2E602D04-8406-471E-877A-1C0F92E2C196.jpeg

5、RotorScriptを作成する

RotorScript
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RotorScript : MonoBehaviour
{
    public int yv;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        Vector3 vect = new Vector3(0, yv, 0);
        transform.Rotate(vect * Time.deltaTime);
    }
}

6, RotorScriptを羽根の部分にアタッチして、yvの値を設定する
820EFE52-A228-437E-A6EC-BFB2F5A2DE2A.jpeg

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?