Feature Overview
C++ Setup
To use the C++ examples, make sure to include:
PublicDependencyModuleNames.Add("Cognitive3D");
in YourProject.Build.cs#include "Cognitive3D/Public/Cognitive3D.h"
in your header file
Sessions
See Sessions for more details.
A Session is automatically recorded and uploaded to the Dashboard when the application runs while the BP_Cognitive3DActor is present in that level. The beginning and end of the Session are marked with events. Sessions also have customizable names, properties and tags.
Participants
See Participants for more details.
This can be used to track a Participant across multiple Sessions. You can set the Participant name, Id and properties at any time. The Participant Id must be Unique.
TWeakPtr<FAnalyticsProviderCognitive3D> cognitive = FAnalyticsCognitive3D::Get().GetCognitive3DProvider();
if (cognitive.IsValid())
{
cognitive.Pin()->SetParticipantId("UniqueID_0001");
cognitive.Pin()->SetParticipantName("Jane Doe");
}
Changing Levels
Data recorded by the SDK will be uploaded automatically when a Level changes. This requires the current Level to have been uploaded to the Dashboard from the Scene Setup Window and that the new Level contains a Cognitive3D Actor. Otherwise, there are no special requirements to use this feature.
If you are using level streaming to cull geometry in a larger level, it is recommended to make all the sublevels visible when exporting your persistent scene from the Scene Setup Window.
Gaze and Fixation
Gaze is automatically recorded on a set interval from the Participant's point of view. This uses the Player Tracker component on the Cognitive3D Actor. When using an Eye Tracking SDK, the Fixation Recorder component on the Cognitive3D Actor is used as well. See Gaze and Fixations for details or Fixations for a high level overview.
Custom Events
For more information, see Custom Events.
Custom Events allow you to record specific events during your experience. These can include position, properties, durations and related Dynamic Objects.
TWeakPtr<FAnalyticsProviderCognitive3D> cognitive = FAnalyticsCognitive3D::Get().GetCognitive3DProvider();
if (cognitive.IsValid())
{
//send an event with a name
cognitive.Pin()->customEventRecorder->Send("My Event");
//send an event with a name and a position
cognitive.Pin()->customEventRecorder->Send("My Event With Position",FVector(0,100,0));
}
Dynamic Objects
For more information, see Dynamic Objects.
The Dynamic Object component allows you to track the positions and states of actors during the Participant's Session. In most cases, you'll simply need to:
- Add a Dynamic Object Component to your actor
- Press the "Export" then "Upload" buttons on the Dynamic Object Component
ExitPoll
For more information, see ExitPoll.
ExitPoll allows you to get direct answers from your Participants. There are two parts to set up:
- Create a Question Set and Hook on the Dashboard.
- Create an ExitPoll Blueprint in Unreal using the Hook.
Sensors
For more information, see Sensors.
When using biometric sensors, you can get a detailed snapshot of the participant's physical state. While we don't support specific sensors, we provide a simple API to record sensor data and display this data on SceneExplorer.
TSharedPtr<FAnalyticsProviderCognitive3D> provider = FAnalyticsCognitive3D::Get().GetCognitive3DProvider();
float oxygen = FMath::FRandRange(75.0, 100.0);
provider->sensors->RecordSensor("Heart.Blood Oxygen", oxygen);
Multiplayer
To see more info on multiplayer, see the Multiplayer or Lobby System page.
A LobbyId connects multiple Participant Sessions together to display a multiuser experience. Please get in contact to discuss your implementation details.
//game server pseudocode
map<string,string> headers;
headers.Add("Authorization","APIKEY:DATA " + APIKey);
auto response = http::post("https://data.cognitive3d.com/v0/lobbies",headers);
auto json = json::parse(response.Content);
string lobbyid = json["id"];
//send lobbyid to each client
//game client
TWeakPtr<FAnalyticsProviderCognitive3D> cognitive = FAnalyticsCognitive3D::Get().GetCognitive3DProvider();
if (cognitive.IsValid())
{
cognitive.Pin()->SetLobbyId(lobbyid);
}
Attributions
For more information, see Attributions.
When opening a URL from your experience, you can append an Attribution Key. This can be captured on your webpage to identify which Session engaged with this content outside of your immersive experience.
auto cognitive = FAnalyticsCognitive3D::Get().GetCognitive3DProvider();
if (cognitive.IsValid())
{
FString parameters = cognitive.Pin()->GetAttributionParameters();
FString url = FString("www.example.com/product_005" + parameters);
FString Error;
FPlatformProcess::LaunchURL(*url, nullptr, &Error);
}
If you have a question or any feedback about our documentation please use the Intercom button (purple circle) in the lower right corner of any web page.