Show / Hide Table of Contents

Interface IUnrealPlayerHooks

An interface for tools to interact with UnrealToolkit's RPC player hooks.

Namespace: Microsoft.XboxStudios.UnrealToolkit
Assembly: UnrealToolkit.Abstractions.dll
Syntax
public interface IUnrealPlayerHooks

Methods

View Source

GetPlayerLocationAsync(int, CancellationToken)

Get the location of the player in the specified index.

Declaration
Task<Vector3> GetPlayerLocationAsync(int index, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int index

Index of the player.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<Vector3>

Location of the player.

View Source

GetPlayerRotationAsync(int, CancellationToken)

Get the rotation of the player in the specified index.

Declaration
Task<Rotation3> GetPlayerRotationAsync(int index, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int index

Index of the player.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task<Rotation3>

Rotation of the player.

View Source

SetPlayerLocationAsync(int, Vector3, CancellationToken)

Set the location of the player in the specified index.

Declaration
Task SetPlayerLocationAsync(int index, Vector3 location, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int index

Index of the player.

Vector3 location

New location.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

SetPlayerRotationAsync(int, Rotation3, CancellationToken)

Set the rotation of the player in the specified index.

Declaration
Task SetPlayerRotationAsync(int index, Rotation3 rotation, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int index

Index of the player.

Rotation3 rotation

New rotation.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

TeleportPlayerAsync(int, Vector3, Rotation3, bool, CancellationToken)

Teleport the player in the specified index to a certain location and rotation in the current map. As opposed to SetPlayerLocationAndRotation, this method can check for clipping issues.

Declaration
Task TeleportPlayerAsync(int index, Vector3 location, Rotation3 rotation, bool enforceNotClipping, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int index

Index of the player to teleport.

Vector3 location

Location to teleport the player to.

Rotation3 rotation

Rotation to place the player in.

bool enforceNotClipping

Indicates if the teleport should be done no matter what. If set to true the engine will look for and adjust or fail due to clipping issues. If set to false, clipping issues may happen.

CancellationToken cancellationToken

A cancellation token for the operation.

Returns
Type Description
Task

A Task representing the asynchronous operation.

  • View Source
In this article
Back to top Generated by DocFX