Page MenuHomeFeedback Tracker

lockCameraTo and rear arc turrets
New, NormalPublic

Description

For a rear arc turret, lockCameraTo only works in half of the turret arc.
https://www.youtube.com/watch?v=ZwWTanvloLs

The half-arc that works changes based on whether the limits are positive or negative angles

                initTurn = 180;
                minTurn = 90;
                maxTurn = 270;
vs
                initTurn = -180;
                minTurn = -270;
                maxTurn = -90;

Current use case is to allow player to have AI gunners track their view direction, this issue limiting rear ramp gunners.
https://www.youtube.com/watch?v=ab9PxffaImg

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Merge config

class CfgVehicles {
    class B_G_Offroad_01_armed_F;
    class test_1: B_G_Offroad_01_armed_F
    {
        class Turrets;
    };
    class test_2: test_1
    {
        class Turrets: Turrets 
        {
            class M2_Turret;
        };
    };
    class test_3: test_2
    {
        class Turrets: Turrets 
        {
            class M2_Turret: M2_Turret
            {
                initTurn = 180;
                minTurn = 90;
                maxTurn = 270;
            };
        };
    };
};

spawn vehicle

{diag_mergeConfigFile [_x];} forEach [
"P:\t.cpp"
];

deleteVehicleCrew test_3; 
deleteVehicle test_3;
test_3 = "test_3" createVehicle (positionCameraToWorld [0,0,5]);
createVehicleCrew test_3;

onEachFrame {
    test_3 lockCameraTo [eyePos player, [0], true];
};

Move around the rear arc and observe the gunner follow/stop following.

Event Timeline

ampersand38 updated the task description. (Show Details)Nov 6 2023, 3:43 PM