Created
August 8, 2015 00:35
-
-
Save Adidea/787f7ef14f60e286c581 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LookVector(surface, cframe) | |
local direction = { | |
["Front"] = cframe.lookVector; | |
["Back"] = cframe.lookVector*-1; | |
["Left"] = (cframe * CFrame.Angles(0, -math.pi/2, 0)).lookVector; | |
["Right"] = (cframe * CFrame.Angles(0, math.pi/2, 0)).lookVector; | |
["Top"] = (cframe * CFrame.Angles(math.pi/2, 0, 0)).lookVector; | |
["Bottom"] = (cframe * CFrame.Angles(-math.pi/2, 0, 0)).lookVector; | |
} | |
return direction[surface] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment