I'd like to change it to a specific angle in front of the player, if that's possible...
Code:
function moveCamera(col)
if col == nil then print("moveCamera ERROR: colour not specified.") return end
print("Moving camera...")
local hand = Player[col]:getPlayerHand()
local parameters = {}
parameters.position = {hand["pos_x"] + (hand["trigger_forward_x"] * 15), 11, hand["pos_z"] + (hand["trigger_forward_z"] * 15)}
parameters.pitch = 45
parameters.yaw = hand["rot_y"]
parameters.distance = 40
Player[col]:lookAt(parameters)
end
I have this code and when I run it on onPlayerChangedColor it doesn't work as the camera is already auto-rotating. s: