Skip to content

Overview of All Prefabs

Imports

Make sure you import the Tobii.XR and PicoXR SDK packages

List

gameSetupPrefab

a prefab which is partly directed by the child, partly by the researchers. (do we want this to be decided upfront?)

Also the caregiver can be shaped via this prefab? (if the child gets to form the caregiver)

stateManagerPrefab

  1. keeps track where we are in a trial:
  2. preTrial:
  3. Trial
  4. endTrial

trialListPrefab:

  1. a list of all upcoming trials
    1. each trial is calculated according to public int contingencyLevel to have a distribution of good and bad trials.
    2. the trialListPrefab dictates the caregiver out of which lists she should be giving a response if activated.
    3. the trialListPrefab decides if the upcoming trial will be
      1. easy/difficult for competition (and level of NPCs)
      2. exclusion/normal game for ostracity
  2. keeps track of current trial via private int currentTrial
  3. if a nextTrial signal is given, currentTrial goes up if not last trial
    1. we store the important values in 'playerprefs': playerprefs or via a singleton: singleton
  4. otherwise we show an endImage

caregiverPrefab:

  1. a model with animation rigging
  2. public bool canBeActivated: makes it possible to activate the caregiver
  3. if practicalSetup & preTrial: caregivers canBeActivated is set to True until startTrial is activated OR hasBeenActivated is set to true
  4. if emotionalSetup & postTrial: caregivers canBeActivated is set to True until nextTrial is activated OR hasBeenActivated is set to true
  5. public bool isActivated:
  6. when activated the caregiver reads a random line of one of both responseLists according to the contingencyMode
  7. also private bool hasBeenActivated gets set to true UNTIL nextTrial signal is given.
  8. two versions: practical & emotional:
  9. four differing lists of possible responses.

responseListPrefab

  1. we need four lists:
  2. emotional responses:
    1. supportive
    2. non-supportive
  3. practical responses:
    1. good advice
    2. bad advice
  4. these lists can be csv format, so they can be maintained outside of unity
  5. we have a function returnResponse(supportType, goodOrBadResponse) which returns a random string from the corresponding list.

scoreBoardPrefab

  1. only necessary in competition
  2. has three variables: one for each player
  3. if endTrial signal is given the score is updated for each player
  4. An animation is shown indicating the ranking of the child.

caregiverScoringPrefab

  1. a 2D image being presented in which the child must indicate on a line how much (s)he trusts the caregiver.
  2. the score is saved via the saveMetricsPrefab

saveMetricsPrefab

a prefab which has one/multiple files open to write to them

Text Balloon

  1. a 3D balloon, oriented towards the player
  2. should show text very clearly
  3. show some particles to draw attention?

Ball

the ball has a state machine:

  1. being grabbed
    1. the ball is interactable by a player
    2. the ball changes to this state when in a certain radius of the player and a raycast hits
  2. being attached
    1. the ball is parented to a player's hand
    2. the ball changes to this state when collided with the players hand
    3. the player does not look anymore to the ball itself. (if the ball's parent is itself or a child of itselves, don't look)
  3. being thrown
    1. by an NPC: via slerp
      1. after x time, at y speed
    2. by the player: via XR rig
      1. with assistance if needed (boolean or floating range of support)
  4. being idle
    1. can be attracted if close enough?
    2. should be destroyed and respawn in a players hand after x time
    3. a ball gets in the idle state if the child did throw the ball and it's not close enough for the other players to attract the ball.

Login Screen Prefab

When the child enters the game for the first time, we need to show a text block in which all steps are explained.

chooseTeamPrefab

child gets to see in-game menu to choose team from, this is a screen that is fixed in position, the child can look away from it towards the caregiver.

if this is shown, no players should be on the field.

Sound from Zapsplat.com

Issues

when parenting a ball, strange things happen. I think it's primarily because the ball was moving before and I've parented it with keeping the location. Yet this does probably NOT stop the movement due to the mass of the object? therefore the ball can be at large distances instead of attached to the hand (as intended)

Project settings ==> Player ==> Scripting Define Symbols ==> DEFINE_NAME ==> #if DEFINE_NAME #endif possible!

set all environment things to a layer and lock it

[System.Serializable] boven een class maakt dat je niet monobehavior component kan scripten

colliders overview!

preferences ==> general ==> Script changes while playing

tooltip attributes

Slerp

Questions

data bijhouden: 1 grote file of liever per topic aparte file, in 1 folder per kind?

TODO: UI scherm aan de zijkant waarop je van scene kunt switchen?

TODO Contingentie Aanpassen

statemanager: nu emotional vs practical , maar ook al competition vs ostracity?

contingentie: wat mama zegt en of het goed of fout is

isGoodTrial mag random zijn

maar isGoodResponse is gelinkt aan het advies hier op

tekst: zwevend in ruimte bij zorgfiguurn + pijltje naar de mond

licht laten uitgaan bij eindigen?

sporthall: achtergrond extra spelers + geluiden

supporters aan de zijkant?

status: checken of alle prefabs goed staan in beide scenes, kunnen we switchen?