Skip to main content

Player

The UInworldPlayerComponent implements Inworld::IPlayerComponent and is the default messaging component supposed to be added to Player Pawn.

This component is supposed to be used as is but can be substituted by a custom Player Component that implements Inworld::IPlayerComponent.

namespace Inworld
{
class IPlayerComponent
{
public:
virtual ICharacterComponent* GetTargetCharacter() = 0;
};
}

Interaction

Set Conversation Participation

Sets the participation state for the player.

Continue Conversation

Note: To set initial state, set "Conversation Participant" variable in blueprint. This will only have effect when the player has targets to interact with.

Continue Conversation

Encourages characters the player has targeted to continue conversing without player input.

Continue Conversation

Add Target Character

Adds a character for the player to interact with.

Add Target Character

Remove Target Character

Stops the player's interaction with the target character.

Clear Target Character

Get Target Character

Gets the first character that the player is interacting with.

Get Target Character

Get Target Characters

Gets the characters that the player is interacting with.

Get Target Character

Is Interacting

Gets if the player is currently interacting with a character.

Is Interacting

Send Text Message To Target

Sends a message of type text to the target character.

Send Text Message To Target

API Send Text Message

Send Custom Event To Target

Sends a custom event to the target character.

Send Custom Event To Target

API Send Custom Event

Send Audio Message To Target

Sends a message of type audio to the target character.

Send Audio Message To Target

API Send Audio Message

Start Audio Session With Target

Starts an audio session with the target character.

Start Audio Session With Target

API Start Audio Session

Stop Audio Session With Target

Stops an audio session with the target character.

Start Audio Session With Target

API Stop Audio Session

Helper Components

To get started quickly with Inworld, some example components for handling character targeting and managing audio sessions are bundled with the plugin. When a player pawn containing an Inworld Player Component also contains an Inworld Player Targeting Component, Inworld Player Audio Capture Component, an Unreal Engine Audio Capture Component, the player will be able to talk to Inworld Characters within a range using a microphone. It is encouraged to create your own components if you have use cases that are not covered by this implementation.

Inworld Player Targeting Component

Default component for choosing the target Character.

Interaction Distance

Maximum distance for interaction between the player and character.

Multiple Targets

If enabled, targeting selects all valid targets. Otherwise, the single best target is selected.

Inworld Player Audio Capture Component

Default component for capturing audio from a mic.

⚠️ It is recommended to use the MicMode Expect Audio End for push-to-talk to prompt responses from the character once the player has indicated that they have stopped talking.

Note: To implement push-to-talk, when the user presses or releases the push-to-talk key toggle the value of SetMuted.

Set Muted

SetMuted will set the muted state of the input capture device. In the muted state, audio will not be processed.

Set Muted

Set Mic Mode

SetMicMode will set the mode of the input capture device for defining a complete player utterance.

Open Mic - A player utterance will be complete once there is a pause in speech. This mode is best suited for natural conversation where no input is required from the player.

Expect Audio End - A player utterance will be complete once the audio has ended. This mode pairs well with push-to-talk or game-driven opportunities for the player to give a response in a given window of time.

Set Mic Mode

Acoustic Echo Cancellation

To enable Echo Cancellation on Inworld Player Audio Capture Component check Enable AEC option.

Player AEC

With this option checked output audio is captured and passed together with input audio to SendAudioDataMessageWithAEC method where audio is filtered before being sent to server.