Page MenuHomeFeedback Tracker

getRelDir and setVectorDirAndUp break Camera Rotation and Alignment
Need More Info, NormalPublic


When using getRelDir before setVectorDirAndUp on a Player the Camera Rotation and Alignment Breaks.


Operating System
Windows 10 x64
Operating System Version
Steps To Reproduce
  1. Load The Test Mission
  2. Rest your Weapon on a steep hill
  3. Go into 3rd Person
  4. execute Code in Debug Console
JK_fnc_test = { 
    player getRelDir player;
    player setVectorDirAndUp [vectorDir player, [0, 0, 1]]; 
if (isNil "JK_Test") then {
    JK_Test = addMissionEventHandler ["EachFrame", {
        call JK_fnc_test; 
Additional Information

Related Issue:

Expected Camera Angle:
Caused Camera Angle:

A Temporäry workaround is calculating the Relative Direction your self with this snipped

private _relDir = (((player getDir target) - getDir player) + 360) % 360;

Event Timeline

jokoho482 created this task.Wed, Sep 2, 1:25 PM
jokoho482 updated the task description. (Show Details)Wed, Sep 2, 3:35 PM
jokoho482 edited Additional Information. (Show Details)Wed, Sep 2, 3:37 PM

cannot reproduce

BIS_fnc_KK changed the task status from New to Need More Info.Wed, Sep 2, 4:48 PM
jokoho482 edited Steps To Reproduce. (Show Details)Wed, Sep 2, 5:27 PM

@BIS_fnc_KK did you go into 3rd Person? I forgot to add that to the Repro steps. in 3rd person, I can to 100% reproduce it on 3 different PCs

Obviously I went into 3rd person. Are you using mods? What Arma 3 version you have. Is this MP, SP, or both?

jokoho482 added a comment.EditedWed, Sep 2, 8:37 PM

I am Running Total Vanilla, Arma 3 Performance Profiling branch, and reproducible in SP and MP(i currently only tested locally hosted)
I noticed that a few positions do not trigger not that extreme effect. on Stratis laying on exactly that position [4444.16,6439.13,-0.000411987] you have the extreme angle, but a few steps back you don't have that issue

I cannot reproduce the issue on the latest dev branch build. It is probably specific to the profiling branch.

I can Reproduce in the latest Dev-Branch Build.

I‘be sent your ticket to our QA let’s see if they can reproduce it

diwako added a subscriber: diwako.Mon, Sep 14, 1:13 PM