Page MenuHomeFeedback Tracker

Player stuck in the car when leaving free camera.
Assigned, UrgentPublic

Description

When I use a free camera (using Camera class, not DayZPlayerCameraBase) while in a car and try to get back in vanilla DayZPlayerCameraBase the player is stuck in the car and the DayZPlayerCameraBase seems to be at the default player camera, not the default car camera (as the player was outiside the vehicle). The player still can control the car but can't open the door and get out of it.

Here is a video showing the problem: https://youtu.be/84xhhxrfkcw

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Load the game with the code (or pbo) bellow, get in a car, press numpad5 (or the key you assigned)
In 4_World:

static MyCustomCamera myCustomCamera;

class MyCustomCamera extends Camera
{	
	void MyCustomCamera()
	{
		myCustomCamera = this;
	}
}

In 5_Mission:

modded class MissionGameplay 
{	
	override void OnUpdate(float timeslice)
	{
		Input TestFreeCarCamInput = GetGame().GetInput();
		if ( TestFreeCarCamInput.LocalPress("TestFreeCarCam_ToggleCamera"))
		{
			if (!myCustomCamera)
			{
				GetGame().SelectSpectator(GetGame().GetPlayer().GetIdentity(), "MyCustomCamera", GetGame().GetPlayer().GetPosition() + "0 0 -20");
			}
			else
			{
				if (myCustomCamera.IsActive())
				{
					myCustomCamera.SetActive(false);
					GetGame().SelectPlayer(GetGame().GetPlayer().GetIdentity(), GetGame().GetPlayer());
				}
				else
				{
					myCustomCamera.SetActive(true);
				}
			}
		}
		super.OnUpdate(timeslice);
	}
}

And here is a ready to use pbo

Additional Information

Note: This bug is not a problem for me if you can solve this one https://feedback.bistudio.com/T169065

Event Timeline

Liven created this task.Mar 24 2023, 12:29 PM
Geez changed the task status from New to Assigned.Mar 29 2023, 10:23 AM