You've made my day Thank you very much, I appreciate such a quick reply.
When I setCameraMatrix and only specify the position of the camera and not the point it's looking at. Can the point the camera is looking at change?
For example I want to change the point the rocket is facing onClientRender.
Thank you very much. I'll post results.
[EDIT]
HMM...
I just looked into findRotation and I don't think it's enough. It seems only to be used for setPedRotation which is deprecated...
I was looking for something such as:
local px, py, pz, lx, ly, lz = getCameraMatrix()
--[[
Solution to problem...
--]]
function getRotationFacingTargetPoint(startPoint, targetPoint)
--[[ blah blah blah
change rotation to face the point ]]
return rx, ry, rz
end
-- Create projectile and guide it towards lx, ly, lz from px, py, pz.
local p = createProjectile(localPlayer, 19, px, py, pz, 1, nil, getRotationFacingTargetPoint(px,py,pz,lx,ly,lz))