• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Experimental Feedback
  • /DZEXP-82
Back
2

Vehicle-specific third-person view server configuration option [CONCERN]

VehiclesFeedbackBalance
2

State

User feedback
Issue key
DZEXP-82
Access
Public
Space
DayZ
Project
Experimental Feedback
Creator
traqu
Created
Sep 16, 2026
Views
50
Platform
PC Steam
What happened?

Haven't had chance to go through the code yet, but please make sure that players can not abuse this feature in a very unimmersive way (as they often do with Wardog's Vehicle3pp mod), by disabling 3pp camera view IF car trunk or hood is open.

This leads to silly looking cars driving recklessly around the map and players inside are unable to be shot at as they are supposed to.

Reproduction steps

Open hood/trunk to increase cover

Enter vehicle, click V and start driving (not)being blinded by the obvious obstacles

Exact build version (optional)
1.30.164014.27 (EXP BRANCH)
Where did it happen?
Unknown
Is it modded?
Unknown
Expected result

Example code below (Working on 1.29 with Wardog's mod):

modded class CarScript
{
	bool TRQ_HasOpenHoodOrTrunk()
	{
		GameInventory inventory = GetInventory();
		int attachmentCount = inventory.AttachmentCount();
		bool blocked = false;

		for (int i = 0; i < attachmentCount; i++)
		{
			EntityAI attachment = inventory.GetAttachmentFromIndex(i);
			if (!attachment)
				continue;

			InventoryLocation location = new InventoryLocation();
			if (!attachment.GetInventory().GetCurrentInventoryLocation(location))
				continue;

			string slotName = InventorySlots.GetSlotName(location.GetSlot());
			string lowerSlotName = slotName;
			lowerSlotName.ToLower();
			if (!lowerSlotName.Contains("hood") && !lowerSlotName.Contains("trunk"))
				continue;

			int doorState = GetCarDoorsState(slotName);
			if (doorState == CarDoorState.DOORS_OPEN)
				blocked = true;
		}

		return blocked;
	}
}
modded class DayZPlayerImplement
{
	override int CameraHandler(int pCameraMode)
	{
		HumanCommandVehicle vehicleCommand = GetCommand_Vehicle();
		if (vehicleCommand)
		{
			CarScript car;
			if (Class.CastTo(car, vehicleCommand.GetTransport()))
			{
				bool blocked = car.TRQ_HasOpenHoodOrTrunk();
				if (!blocked)
					return super.CameraHandler(pCameraMode);

				m_Camera3rdPerson = false;
				ChangeVehicleView(false);
				return DayZPlayerCameras.DAYZCAMERA_1ST_VEHICLE;
			}
		}

		return super.CameraHandler(pCameraMode);
	}

	override void HandleView()
	{
		super.HandleView();

		HumanInputController hic = GetInputController();
		HumanCommandVehicle vehicleCommand = GetCommand_Vehicle();
		if (!hic.CameraViewChanged() || !vehicleCommand)
			return;

		CarScript car;
		if (Class.CastTo(car, vehicleCommand.GetTransport()))
		{
			bool blocked = car.TRQ_HasOpenHoodOrTrunk();
			if (!blocked)
				return;

			m_Camera3rdPerson = false;
			ChangeVehicleView(false);
		}
	}
}
Reactions

Activity

    25 days ago
  • traqu
    created issue25 days ago
  • traqu
    changed25 days ago
  • l909
    changed state to
    USER FEEDBACK
    25 days ago

You are not signed in. Please sign in to see more details and to reply.

State

User feedback
Issue key
DZEXP-82
Access
Public
Space
DayZ
Project
Experimental Feedback
Creator
traqu
Created
Sep 16, 2026
Views
50