redditing Posted September 27, 2020 Share Posted September 27, 2020 So if i using function "setCameraMatrix" then i can't rotation it. For example i want set camera in one point and turn it 90 degrees in left but i can't pls help! function DropCamera(player, command) local x, y, z = getElementPosition(player) setCameraMatrix(player, x, y, z+1.5, 0, 0, 90, 0, 0) end addCommandHandler("setcamera", DropCamera) Link to comment
Moderators IIYAMA Posted September 27, 2020 Moderators Share Posted September 27, 2020 (edited) 1 hour ago, redditing said: So if i using function "setCameraMatrix" then i can't rotation it. For example i want set camera in one point and turn it 90 degrees in left but i can't pls help! function DropCamera(player, command) local x, y, z = getElementPosition(player) setCameraMatrix(player, x, y, z+1.5, 0, 0, 90, 0, 0) end addCommandHandler("setcamera", DropCamera) Like this: local cam = getCamera() local rx, ry, rz = getElementRotation(cam) --[[ rx, ry, rz -- transformations ]] setElementRotation(cam, rx, ry, rz) Edited September 27, 2020 by IIYAMA 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now