Orbit cam does not look at player when DespawnPlayer is called

Describe the bug:
when using DespawnPlayer or DespawnPlayerWithEffect, orbit cam aka cameraType = 2, does not look at the player on despawn.
Action cam does look at the player on Despawn.

Desired or Expected Behavior:
Orbit cam retains or keeps the same view of player on despawn.
Action cam does this and yes changing to action cam before despawn works to observe the despawn. This is not desired view and is disorienting to switch back and forth from oribit to action came and back to orbit cam on player spawn

How do you cause this bug?

  • List the steps
    Player Template - set camera to orbit cam
    Despawn Player
    Camera looks on the level into the sky. User cannot and does not see player despawn.

Screenshots / video of bug:

video also includes the commented out editor shot used for a work around

Which platform: PC / Stadia
Stadia

Which input: Controller / keyboard + mouse
both

Your Crayta username:
sinjin

Game seen in (including “Hub” or “Editor for XYZ”):
“Checkpoint Tutorial Expanded” is current game name

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible):
10/10
Time + date seen:
2022-03-26 at 0755 GMT

Version number (found in Help tab in Settings):
0.e5.40.115857

(PC only) hardware specs (upload dxdiag file if possible - Open and run DxDiag.exe):

Remember!
The more information you provide, the more likely it is that this bug can be fixed quickly! Also, if this was discussed in Discord / Reddit / elsewhere, it might help to include a screenshot of that discussion!

these are scripts i’m using in the above bug
this is on the user

local SpawnPlayerScript = {}

-- Script properties are defined here
SpawnPlayerScript.Properties = {
}

function SpawnPlayerScript:DespawnSpawnPlayer(checkpoint)
	self:Schedule(function()
		-- switch to action camera - orbit cam does not display aka buggy	
		-- self:GetEntity():GetPlayer().cameraType = 1 -- used to make camera somewhat friendly
		-- save original locator
		local spawnPoint = self:GetEntity().spawnUserScript:GetSpawn()
		-- despawn player with effect
		self:GetEntity():DespawnPlayerWithEffect()
		Wait(2)
		-- if checkpoint has no value, spawnUserScript will use default spawnPoint
		if checkpoint then 
			print("Transport Player to: ", checkpoint:GetName())
			self:GetEntity().spawnUserScript:SetSpawn(checkpoint)
		end
		-- spawn player -- spawnUserScript can be changed to SpawnPlayerWithEffect
		self:GetEntity().spawnUserScript:SpawnInternal()
		Wait(1)
		-- reset spawnpoint back (needed for transporter)
		self:GetEntity().spawnUserScript:SetSpawn(spawnPoint)
	end)
end

return SpawnPlayerScript

this is the transport pad

local TransportPlayerScript = {}

-- Script properties are defined here
TransportPlayerScript.Properties = {
	{ name = "destination", type = "entity", is = locator, },
}

--This function is called on the server when this entity is created
function TransportPlayerScript:Init()
end

function TransportPlayerScript:Transport(player)
	player:GetUser().spawnPlayerScript:DespawnSpawnPlayer(self.properties.destination)
end

return TransportPlayerScript

on the player

local RespawnPlayerScript = {}

-- Script properties are defined here
RespawnPlayerScript.Properties = {
	{ name = "checkpoint", type = "entity", editable = false, },
}

function RespawnPlayerScript:OnDeathPlaneTrigger()

	-- if this script exists, run custom function, else default method
	if self:GetEntity():GetUser().spawnPlayerScript then
		-- script named function to DespawnPlayerWithEffect and SpawnInternal
		self:GetEntity():GetUser().spawnPlayerScript:DespawnSpawnPlayer(self.properties.checkpoint)
	else
		-- if the above script is not found, respawn the player this way without effect
		self:GetEntity():GetUser():SendToScripts("OnPlayerDied", self:GetEntity(), nil)
	end
end

return RespawnPlayerScript

in spawnUserScript part of Auto-Respawn package
i changed …
SpawnPlayer to SpawnPlayerWithEffect

Hey there @sinjin!

Sorry to see that this issue is occurring, I have gone ahead and opened up a ticket for our internal team to investigate this matter further. Thank you for bringing it to our attention, as well thank you for the scripts! :slight_smile:

1 Like

orbit cam - respawn shows first person view of respawn
the distance one as before no longer even shows on respawn.

expected behavior: orbit cam spawn and depawn would show the same distance and agle as the orbit settings on the player

ver 0.f1.133.119466
video