Personally not really that into CFrame calculations and such, but my main goal here is to get the dragon’s head to follow the thumbstick’s direction
(main thing I noticed was the head pointing backwards every time the thumbstick goes straight on the axis)
video
local currentRotation = PlayerModule:GetControls():GetMoveVector()
RunService.Heartbeat:Connect(function(dt)
Dragon.Head.CFrame *= CFrame.new(0,0,-10 * dt)
local moveVector = PlayerModule:GetControls():GetMoveVector()
if (moveVector ~= Vector3.zero) then
currentRotation = moveVector
end
Dragon.Head.CFrame = CFrame.Angles((currentRotation.X * math.pi) - (currentRotation.Z * math.pi),math.pi,0) + Dragon.Head.CFrame.Position --this is the line that handles the direction
end)