{"name":"direction","title":"direction","type":"command","url":"https://community.bistudio.com/wiki/direction","revid":376966,"updated":"2026-01-01T05:58:04Z","groups":["Object Manipulation","Locations"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).","syntaxes":[{"syntax":"direction object","params":[{"name":"object","type":"Object or Location","type_expr":"Object | Location"}],"returns":{"type":"Number in range 0..360","type_expr":"Number","description":"Direction in degrees"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["player setDir 90;\n_d = direction player;//returns 90"]}],"see_also":["getDir","getDirVisual","setDir","setDirection"]}