0% found this document useful (0 votes)
31 views4 pages

Date:25-02-25 Exp 5b Procedure

The document outlines procedures for creating AR and VR projects using Unity, detailing steps for setting up the environment, installing necessary packages, and configuring settings for touch interaction and VR controls. In the AR project, users can place a cube on detected AR planes, while the VR project enables interaction with objects using controllers. Both projects culminate in building and deploying applications for mobile or PC platforms.

Uploaded by

Revathy Raja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

Date:25-02-25 Exp 5b Procedure

The document outlines procedures for creating AR and VR projects using Unity, detailing steps for setting up the environment, installing necessary packages, and configuring settings for touch interaction and VR controls. In the AR project, users can place a cube on detected AR planes, while the VR project enables interaction with objects using controllers. Both projects culminate in building and deploying applications for mobile or PC platforms.

Uploaded by

Revathy Raja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CSE451: Extended Realities Reg.

No:2363022

Date:25-02-25

Exp 5b : PLACING OBJECT ON SCREEN WITH TOUCH INTERACTION

Procedure :

Step1: Create a New Project:

 Open Unity Hub and create a new 3D project.


 Name your project and choose a location to save it.

Step2: Install Required Packages:

 Go to Window → Package Manager


 In the Package Manager, select Unity Registry from the dropdown
 Search for AR and install
 AR Foundation
 Google ARCore XR Plugin

Step3: Configure AR Settings

 Delete the Main Camera (as AR uses a different camera setup)


 Go to GameObject → XR → AR Session Origin and add AR Session manually if not
added automatically
 Inside AR Session Origin, add AR Raycast Manager and AR Plane Manager components
in the Inspector

Step4: Add 3D Object and Interaction:

 Create a 3D Object → Cube in the scene.


 Reduce its scale to make it more realistic
 Convert the Cube into a Prefab:
 Drag the Cube from Hierarchy to the Project window to create a prefab.
 Delete the Cube from the scene (it will be instantiated dynamically).

Step5: Create a Script for Touch Interaction:

 Create a new C# Script


 Open the script and replace the content

Step6: Set Up Player Settings for AR:

 . Go to Edit → Project Settings → XR Plugin Management.


 2. Enable ARCore
 3. In Build Settings, set Target Platform to Android

Dept. of ECE [ AIML] Page


CSE451: Extended Realities Reg. No:2363022

Step7: Build and Transfer the APK:

 Go to File → Build Settings and select Android (if not already selected).
 Click Switch Platform.
 Click Build and generate the APK file.
 Transfer the APK to your mobile device and install it.

Output:

Result: When you tap on a detected AR plane, a cube will appear at that position.The cube will
be instantiated dynamically based on the touch interaction.

Dept. of ECE [ AIML] Page


CSE451: Extended Realities Reg. No:2363022

Date: 25-02-25

Exp 6: VR Project

Procedure :

Step1: Create a New Unity Project:

 Open Unity Hub and create a 3D project


 Name the project and choose a save location

Step2: Install Required XR Packages:

 Go to Window → Package Manager


 In the Package Manager, select Unity Registry
 Search for XR and install the following:
 XR Plugin Management
 XR Interaction Toolkit
 OpenXR Plugin

Step3: Configure XR Settings:

 Go to Edit → Project Settings → XR Plugin Management


 Under PC → Android
 Add Input System Package
 Set Input Handling to Both (Under Player Settings → Other Settings)

Step4: Set Up VR Controls:

 Go to GameObject → XR → XR Rig (Action-based) to add the VR rig


 Import the XR Device Simulator from XR Interaction Toolkit:
 Go to Assets → Import XR Device Simulator

Step5: Add VR Hand Controllers:

 Go to Window → Asset Store and import XR Interaction Toolkit Starter Assets


 Select Left Controller and Right Controller
 Assign Controller Actions from XR Input Actions

Step6: Add an Object to Interact With:

 Add a Cube (or any 3D object) to the Hierarchy


 Attach an XR Grab Interactable component to the object
 Ensure the XR Ray Interactor is active on controllers

Step7: Build & Test the VR Application:

Dept. of ECE [ AIML] Page


CSE451: Extended Realities Reg. No:2363022

 Go to File → Build Settings.


 Set the Platform to PC, Android, or Oculus based on your target device.
 Click Switch Platform.
 Adjust Player Settings:
 Enable VR Support.
 Select the correct XR Plugin
 Build and deploy the project

Output:

Result: The VR project will allow users to interact with objects using controllers.The XR Device
Simulator can be used to test interactions without a headset.

Dept. of ECE [ AIML] Page

You might also like