Interactable Prefab Constructor

Inherits from Generic Prefab Constructor. This constructor should be applied to any prefab that will be interacted from the user and has physics properties.

It should be noted that the developer can select if the prefab is kinematic or has gravity.

This selection does NOT affect the prefabs whole lifetime. Since it’s an interactable prefab it will always have gravity! If the developer selects kinematic, the prefab will be kinematic from the time it is spawned until the user grabs it.

When it will be released from the user it will turn back on the gravity. If the reset function is called the kinematic property will turn back on.

Variable Name

Type

Description

Prefab Interactable Type

Generic, Insert, Remove

Select how this prefabs is going to be used.

Prefab Detach Feature

ReInitialize, Destroy, EventTriggerCurrLSAOnDestroy

Select what the prefab should do when the user throws it away. Reset the prefab, destroy it or destroy it and call the Event Manager to trigger the Action Completion.

Allow Prefab Manual Reset

Boolean

Set to true in order for the PrefabSpawnManager to be allowed to observe and reset the specific prefab when needed.

Two Hand Interaction

Boolean

Set to true if prefab can be grabbed with both hands. Still EXPERIMENTAL, it might not work properly

Attach Prefab Spawn Notifier

Boolean

If true it attaches a script that flashes the prefab to be able to be noticed more easily from the user. When grabbed it auto destroys itself.

Prefab Material Type

enum

This is a selection for different sounds attached to the gameobject, not materials! It is still experimental and might not work properly. The developers should define their own sounds.

Min Distance Reset

enum

Set the gameobjects range from its starting to its current position where, when greater, the prefab will be reset.

Prefab Creation Requirements

  1. Rigidbody

  2. Non-triggered colliders, for physics collision

  3. Trigger collider (optional), for action triggering & user grab trigger

  4. MAGESInteractableItem script attached

  5. Have no other transform as parent