Skip to content

Commit

Permalink
add :GetLook() player class method
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuh4 committed Jun 5, 2024
1 parent 100ae43 commit c310593
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Noir/Classes/Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,22 @@ function Noir.Classes.PlayerClass:IsDowned()
return data.dead or data.incapacitated or data.hp <= 0
end

--[[
Returns this player's look direction.
]]
---@return number LookX
---@return number LookY
---@return number LookZ
function Noir.Classes.PlayerClass:GetLook()
local x, y, z, success = server.getPlayerLookDirection(self.ID)

if not success then
return 0, 0, 0
end

return x, y, z
end

-------------------------------
-- // Intellisense
-------------------------------
Expand Down

0 comments on commit c310593

Please sign in to comment.