跳转至

3D PACT Trainee Station (ES)

约 475 个字 预计阅读时间 2 分钟

Contents

Overview & Key Concepts

The purpose of the Engineer Station and its relationship to the Instructor Station

  • [The Flow from Setup to Export]
  • Asset Bundles — What are Asset Bundles, and why do we use them?
  • Interactables — An introduction to the two components of an interactable

[Creating Interactables]

The following steps outline how to set up a basic select, grab, rotate, poke, or pull Interactable, using a rotatable valve as an example.

  1. Drag your model from the Project Folder into the scene and name it

  2. Add the following components to the model Game Object to make it Interactable:

    1. Interactable Visual

    2. A Collider

  3. Navigate in the Project to ‘Client Files’ → ‘Prefabs’ → ‘Interaction States’

  4. Identify which interaction(s) you require and drag the relevant Interactable State prefab(s) into the scene. It does not matter where in the scene you place the prefab

  5. Rename the prefab to indicate what Interactable it relates to


image.png
A valve model `Game Object` with an `Interactable State` of type `Rotate State` prefab3D PACT Operator Training Features

  1. On the Interactable, drag the Interactable State prefab(s) into the State Objects array on the Interactable Visual component

    1. If the Set First State On Start bool is true, the Interactable will occupy the first Interactable State in the State Objects array on start during runtime

image.png
The valve’s `Interactable Visual` component set up to initialize in a `Rotate State`

  1. On the Interactable, optionally drag its Mesh Renderer component into the Interaction Affordance Renderer variable on the Interactable Visual component

    1. This will enable colour changes to the Interactable’s material when you hover, select, or activate it (press trigger) during play mode
  2. If you wish to switch between Interactable States, you will need to create some Visual Scripting logic. This is discussed in the section Visual Scripting Interactable Logic.

[Visual Scripting Interactable Logic]

Visual Scripting in the context of Interactables is most commonly required in two cases:

  1. To switch between Interactable States - to change from one type of interaction to another, i.e. a select interaction to a pull interaction

  2. To track the progress of an interaction and do something when the progress has been reached. For example, if a valve is opened (its minimum rotation limit is reached), a fire should start. Progress is tracked between Start and End. Each Interactable State handles progress between Start and End differently. These particulars are outlined in the [Interactable States] section.

Scripts in Visual Scripting are called Graphs. There are two kinds: Script Graphs and State Graphs. A Script Graph contains logic, while a State Graph contains behaviours that can transition between one another. This section will be focusing on State Graphs, although Script Graphs can be used as well. For more information on Visual Scripting in Unity, refer to the Unity Visual Scripting page.

Preparing for Export

[Interactable States]

[Useful Visual Scripting Node Combinations]

[Exporting & Uploading the Asset Bundle]