VR Interaction Framework v2.0
Loading...
Searching...
No Matches
BNG.PlayerTeleport Class Reference

A basic Teleport script that uses a parabolic arc to determine teleport location. More...

Inheritance diagram for BNG.PlayerTeleport:

Public Member Functions

delegate void OnBeforeTeleportFadeAction ()
 
delegate void OnBeforeTeleportAction ()
 
delegate void OnAfterTeleportAction ()
 
void DoCheckTeleport ()
 
void TryOrHideTeleport ()
 
void EnableTeleportation ()
 
void DisableTeleportation ()
 
virtual void BeforeTeleportFade ()
 This is called immediately before fade is called and before BeforeTeleport has fired.
 
virtual void BeforeTeleport ()
 
virtual void AfterTeleport ()
 
void TeleportPlayer (Vector3 destination, Quaternion rotation)
 
void TeleportPlayerToTransform (Transform destination)
 
virtual bool KeyDownForTeleport ()
 
virtual bool KeyUpFromTeleport ()
 

Public Attributes

LineRenderer TeleportLine
 
Color ValidTeleport = Color.green
 
Color InvalidTeleport = Color.red
 
ControllerHand HandSide = ControllerHand.Left
 
Transform TeleportBeginTransform
 
Transform TeleportBeginTransformAlt
 
Transform TeleportDestination
 
TeleportDestination DestinationObject
 
GameObject TeleportMarker
 
Transform DirectionIndicator
 
float MaxRange = 20f
 
int SegmentCount = 1000
 
float SimulationVelocity = 500f
 
float SegmentScale = 0.01f
 
LayerMask CollisionLayers
 
LayerMask ValidLayers
 
TeleportControls ControlType = TeleportControls.ThumbstickRotate
 
InputActionReference InitiateTeleportAction
 
bool AllowTeleportRotation = true
 
bool ForceStraightArrow = false
 
float MaxSlope = 60f
 
float TeleportYOffset = 0f
 
bool FadeScreenOnTeleport = true
 
float TeleportFadeSpeed = 10f
 
float TeleportDelay = 0.2f
 
PhysicMaterial FrictionMaterial
 

Protected Member Functions

virtual void calculateParabola ()
 
virtual bool teleportClear ()
 
virtual void hideTeleport ()
 
virtual void updateTeleport ()
 
virtual void rotateMarker ()
 
virtual void tryTeleport ()
 

Protected Attributes

bool aimingTeleport = false
 
bool validTeleport = false
 
bool teleportationEnabled = true
 

Properties

bool AimingTeleport [get]
 

Events

static OnBeforeTeleportFadeAction OnBeforeTeleportFade
 
static OnBeforeTeleportAction OnBeforeTeleport
 
static OnAfterTeleportAction OnAfterTeleport
 

Detailed Description

A basic Teleport script that uses a parabolic arc to determine teleport location.

Member Function Documentation

◆ AfterTeleport()

virtual void BNG.PlayerTeleport.AfterTeleport ( )
virtual

◆ BeforeTeleport()

virtual void BNG.PlayerTeleport.BeforeTeleport ( )
virtual

◆ BeforeTeleportFade()

virtual void BNG.PlayerTeleport.BeforeTeleportFade ( )
virtual

This is called immediately before fade is called and before BeforeTeleport has fired.

◆ calculateParabola()

virtual void BNG.PlayerTeleport.calculateParabola ( )
protectedvirtual

◆ DisableTeleportation()

void BNG.PlayerTeleport.DisableTeleportation ( )

◆ DoCheckTeleport()

void BNG.PlayerTeleport.DoCheckTeleport ( )

◆ EnableTeleportation()

void BNG.PlayerTeleport.EnableTeleportation ( )

◆ hideTeleport()

virtual void BNG.PlayerTeleport.hideTeleport ( )
protectedvirtual

◆ KeyDownForTeleport()

virtual bool BNG.PlayerTeleport.KeyDownForTeleport ( )
virtual

◆ KeyUpFromTeleport()

virtual bool BNG.PlayerTeleport.KeyUpFromTeleport ( )
virtual

◆ OnAfterTeleportAction()

delegate void BNG.PlayerTeleport.OnAfterTeleportAction ( )

◆ OnBeforeTeleportAction()

delegate void BNG.PlayerTeleport.OnBeforeTeleportAction ( )

◆ OnBeforeTeleportFadeAction()

delegate void BNG.PlayerTeleport.OnBeforeTeleportFadeAction ( )

◆ rotateMarker()

virtual void BNG.PlayerTeleport.rotateMarker ( )
protectedvirtual

◆ teleportClear()

virtual bool BNG.PlayerTeleport.teleportClear ( )
protectedvirtual

◆ TeleportPlayer()

void BNG.PlayerTeleport.TeleportPlayer ( Vector3  destination,
Quaternion  rotation 
)

◆ TeleportPlayerToTransform()

void BNG.PlayerTeleport.TeleportPlayerToTransform ( Transform  destination)

◆ TryOrHideTeleport()

void BNG.PlayerTeleport.TryOrHideTeleport ( )

◆ tryTeleport()

virtual void BNG.PlayerTeleport.tryTeleport ( )
protectedvirtual

◆ updateTeleport()

virtual void BNG.PlayerTeleport.updateTeleport ( )
protectedvirtual

Member Data Documentation

◆ aimingTeleport

bool BNG.PlayerTeleport.aimingTeleport = false
protected

◆ AllowTeleportRotation

bool BNG.PlayerTeleport.AllowTeleportRotation = true

◆ CollisionLayers

LayerMask BNG.PlayerTeleport.CollisionLayers

◆ ControlType

TeleportControls BNG.PlayerTeleport.ControlType = TeleportControls.ThumbstickRotate

◆ DestinationObject

TeleportDestination BNG.PlayerTeleport.DestinationObject

◆ DirectionIndicator

Transform BNG.PlayerTeleport.DirectionIndicator

◆ FadeScreenOnTeleport

bool BNG.PlayerTeleport.FadeScreenOnTeleport = true

◆ ForceStraightArrow

bool BNG.PlayerTeleport.ForceStraightArrow = false

◆ FrictionMaterial

PhysicMaterial BNG.PlayerTeleport.FrictionMaterial

◆ HandSide

ControllerHand BNG.PlayerTeleport.HandSide = ControllerHand.Left

◆ InitiateTeleportAction

InputActionReference BNG.PlayerTeleport.InitiateTeleportAction

◆ InvalidTeleport

Color BNG.PlayerTeleport.InvalidTeleport = Color.red

◆ MaxRange

float BNG.PlayerTeleport.MaxRange = 20f

◆ MaxSlope

float BNG.PlayerTeleport.MaxSlope = 60f

◆ SegmentCount

int BNG.PlayerTeleport.SegmentCount = 1000

◆ SegmentScale

float BNG.PlayerTeleport.SegmentScale = 0.01f

◆ SimulationVelocity

float BNG.PlayerTeleport.SimulationVelocity = 500f

◆ teleportationEnabled

bool BNG.PlayerTeleport.teleportationEnabled = true
protected

◆ TeleportBeginTransform

Transform BNG.PlayerTeleport.TeleportBeginTransform

◆ TeleportBeginTransformAlt

Transform BNG.PlayerTeleport.TeleportBeginTransformAlt

◆ TeleportDelay

float BNG.PlayerTeleport.TeleportDelay = 0.2f

◆ TeleportDestination

Transform BNG.PlayerTeleport.TeleportDestination

◆ TeleportFadeSpeed

float BNG.PlayerTeleport.TeleportFadeSpeed = 10f

◆ TeleportLine

LineRenderer BNG.PlayerTeleport.TeleportLine

◆ TeleportMarker

GameObject BNG.PlayerTeleport.TeleportMarker

◆ TeleportYOffset

float BNG.PlayerTeleport.TeleportYOffset = 0f

◆ ValidLayers

LayerMask BNG.PlayerTeleport.ValidLayers

◆ ValidTeleport

Color BNG.PlayerTeleport.ValidTeleport = Color.green

◆ validTeleport

bool BNG.PlayerTeleport.validTeleport = false
protected

Property Documentation

◆ AimingTeleport

bool BNG.PlayerTeleport.AimingTeleport
get

Event Documentation

◆ OnAfterTeleport

OnAfterTeleportAction BNG.PlayerTeleport.OnAfterTeleport
static

◆ OnBeforeTeleport

OnBeforeTeleportAction BNG.PlayerTeleport.OnBeforeTeleport
static

◆ OnBeforeTeleportFade

OnBeforeTeleportFadeAction BNG.PlayerTeleport.OnBeforeTeleportFade
static

The documentation for this class was generated from the following file: