Page MenuHomeFeedback Tracker

camSetDir command is bugged
Closed, ResolvedPublic


According to BIKI camSetDir requires 0-360 angle parameter. This is false as ArmA 3 complains it needs array. In fact after some experiments I can confirm it indeed requires a vector direction array i.e. [0,0,1] to point up [0,1,0] to point north etc. [0,0,0] points north as well.

Anyway the command requires camCommit. As soon as camCommit executed it starts to spin and oscillation frequency depends on camCommit value which pretty much makes this otherwise very useful command totally unusable.


Legacy ID
Won't Fix
Steps To Reproduce

Open debug console in editor type

_pos = +(position player); _pos set [2, 100]; _cam = "camera" camCreate _pos; _cam cameraEffect ["EXTERNAL", "BACK"]; _cam camSetDir [-1,0,0]; _cam camCommit 0;

after execution the camera point in the correct direction, as soon as you hide debug console it starts spinning.

other values to try

_cam camSetDir [0,0,1];
_cam camSetDir [0,0,-1];
_cam camSetDir [1,1,0];

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Engine.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Won't Fix.
Killzone_Kid set Legacy ID to 881211453.May 7 2016, 1:53 PM
Killzone_Kid edited a custom field.

Needs to be fixed, just tested and confirmed bug

camSetDir takes a vector. The wiki is just wrong. Use setDir for degrees.

Well MulleDK19 how is the spinning uncontrollably camera is working as intended?

ceeeb added a comment.Jun 11 2013, 9:10 AM

You can achieve the same result by using camSetTarget instead. Example:
_cam camSetTarget [(_pos select 0) + 1, (_pos select 1), (_pos select 2)];

madbull added a subscriber: madbull.May 7 2016, 1:53 PM

Problem confirmed. A discuss about here :

We can use setVectorDirAndUp (or setVectorDir) for 3D vector.
Or setDir for azimut angle.

MadDogX added a subscriber: MadDogX.May 7 2016, 1:53 PM

Mass closing ancient tickets with no activity for > 12 months; assume fixed or too trivial.

If this issue is still relevant in current dev build, please re-post.

@ceeeb camSetTarget is not the same, as camSetDir works with camCommit and therefore should allow for cam animation. Also camSetTarget [0,0,0] expected to turn camera towards map origin, but instead is ignored; camSetTarget [0,0,1], i.e. quite close but different from [0,0,0] would work though.

I'm reopening this as japapatramtara has recently attempted to fix the command. Will see how it goes.

closing as not fixable. it was broken for a long time and recent attempt to fix it went nowhere

Reopening to try once more.

Pretty sure by now this command is FUBAR. At least I tried, twice. Closed forever.