I was exploring the CFrame methods on the wiki page, then I came across CFrame.fromAxisAngle. I tried searching up some tutorials or videos, but none of them gave me information how to use it.
According to the wiki, I need a unit vector and a rotation in radians. I get the rotation parameter, but not the unit vector one. Can someone please tell me how to use it. Here's what I'm trying to do:
-- This is not the full code. Only the part where I need help
local gunAngle = CFrame.fromAxisAngle(Help here, math.rad(49))
gun:SetPrimaryPartCFrame(CFrame.new(gunCFrame, gunLookAt)*gunSway*gunAngle)
Edit: I forgot to tell you that I'm using CFrame.fromAxisAngle to prevent gimbal lock.

1 comment
Uhh... anyone?