28
Google Cardboard + Unity Workshop Part II : Gaze Interaction, Spatial Audio, and Building Worlds Interaction Design / IID 2016 Spring Class hours : Tuesday 2 pm – 6 pm Lecture room : International Campus Veritas Hall B203 10 th May IxD Studio IID, 2016 Spring 1

[IxD] Studio 02. Cardboard+Unity Workshop Part II

  • Upload
    dsdlab

  • View
    1.393

  • Download
    2

Embed Size (px)

Citation preview

Google Cardboard + Unity Workshop Part II : Gaze Interaction, Spatial Audio, and Building Worlds Interaction Design / IID 2016 Spring

Class hours : Tuesday 2 pm – 6 pm

Lecture room : International Campus Veritas Hall B203

10th May

IxD

Stu

dio

IID, 2

016

Spr

ing

1

Getting Started Download and Samples −https://developers.google.com/cardboard/unity/downloa

d

Download Unity −http://unity3d.com/get-unity/download

Download Android Studio −http://developer.android.com/sdk/index.html

IxD

Stu

dio

IID, 2

016

Spr

ing

2

Download Assets From the Store Nature Starter Kit 2 −https://www.assetstore.unity3d.com/en/#!/content/52977

In the Park (Ambient Soundtrack) −https://www.assetstore.unity3d.com/en/#!/content/51986

Ambient Sample Pack −https://www.assetstore.unity3d.com/en/#!/content/3765

IxD

Stu

dio

IID, 2

016

Spr

ing

3

Exercise 1. Cardboard Reticle

IxD

Stu

dio

IID, 2

016

Spr

ing

4

Change Cardboard Main Parameters

IxD

Stu

dio

IID, 2

016

Spr

ing

5

Transform > Position (X, Y, Z) = (0, 1, 0)

Add CardboardReticle : Assets > Cardboard > Prefabs > UI

IxD

Stu

dio

IID, 2

016

Spr

ing

6

CardboardReticleMaterial √ Color √ InnerDiameter √ OuterDiameter √ DistanceInMeters

Main Camera

IxD

Stu

dio

IID, 2

016

Spr

ing

7

Add Component √ Physics Raycaster

Add a Cube

IxD

Stu

dio

IID, 2

016

Spr

ing

8

Add Teleport Script √ Assets > Cardboard > DemoScene

Add Component “Event Trigger” √ Pointer Enter

− SetGazedAt()

√ Pointer Exit − SetGazedAt()

√ Pointer Down

− TeleportRandomly()

Add an EventSystem

IxD

Stu

dio

IID, 2

016

Spr

ing

9

Add Component √ “Gaze Input Module”

Play & Test

IxD

Stu

dio

IID, 2

016

Spr

ing

10

Create a 3D Object Capsule

IxD

Stu

dio

IID, 2

016

Spr

ing

11

Add a Capsule √ Name it “Player”

Add Follow Player Script to Cardboard Main

IxD

Stu

dio

IID, 2

016

Spr

ing

12

Make a First Person View √ Add the “Follow Player”

script to Cardboard Main Object

√ Drag the Player Object to the Player Game Object Space

Add Components to the Player Object

IxD

Stu

dio

IID, 2

016

Spr

ing

13

Add Nav Mesh Agent Add “Player Motor” Script √ Drag “CardboardReticle” under

Main Camera Object to the Cardboard Reticle object space.

Activate the Plane Navigation

IxD

Stu

dio

IID, 2

016

Spr

ing

14

Select the Plane Select the Navigation Tab √ Navigation Static :

Checked √ Navigation Area :

Walkable √ Hit the “Bake” Button

Add an Event Trigger to the Plane

IxD

Stu

dio

IID, 2

016

Spr

ing

15

Add “Event Trigger” Component √ Under the Event

Trigger add PointDown Event Drag the Player Object to the space,

√ Select PlayMotor.SetDestinationToCuror Method

Play & Test

IxD

Stu

dio

IID, 2

016

Spr

ing

16

Exercise 2. Spatial Audio

IxD

Stu

dio

IID, 2

016

Spr

ing

17

Add a Capsule 3D Object

IxD

Stu

dio

IID, 2

016

Spr

ing

18

Add CardboardAudioSource in the Capsule : Assets > Cardboard > Prefabs > Audio

IxD

Stu

dio

IID, 2

016

Spr

ing

19

Add AudioClip √ Assets > Ambient Sound Samples √ “Open Space Wind”

Select Edit > Project Settings > Audio

IxD

Stu

dio

IID, 2

016

Spr

ing

20

Audio Manager √ Spatializer Plugin

√ CardboardAudio Spatializer

Play & Test

IxD

Stu

dio

IID, 2

016

Spr

ing

21

Exercise 2 Extension

IxD

Stu

dio

IID, 2

016

Spr

ing

22

Add a Terrain 3D Object

IxD

Stu

dio

IID, 2

016

Spr

ing

23

Edit Terrain Textures √ Assets > NatureStarterKit2 > Textures √ ground01

Add a Point Light Object

IxD

Stu

dio

IID, 2

016

Spr

ing

24

Change the Capsule Object Texture

IxD

Stu

dio

IID, 2

016

Spr

ing

25

Create > Material

IxD

Stu

dio

IID, 2

016

Spr

ing

26

Select Transparent Texture

Add Autowalk Script to CameraMain Game Object

IxD

Stu

dio

IID, 2

016

Spr

ing

27

Add Component √ Rigidbody √ Constraints

√ Freeze Position : Y √ Freeze Rotation : Y

Add Script “Autowalk.cs” √ Modified Version of

https://goo.gl/xJWCQF √ Speed : 1 √ Walk When Look Down √ Threshold Angle : 5 √ Freeze Y Position : Checked

Play & Test

IxD

Stu

dio

IID, 2

016

Spr

ing

28