Script.entity2 = nil --entity "allignto"
function Script:Start()
self.camera=Camera:Create()
self.camera:SetFOV(90)
self.camera:SetRange(0.05,1000)
self.camera:SetMultisampleMode((System:GetProperty("multisample","1")))
self.camera:SetMass(0)
self.entity:SetMass(0)
end
function Script:UpdateWorld()
self.camera:AlignToVector(self.entity2:GetPosition())
self.camera:SetPosition(self.entity:GetPosition())
end
I have no Idea on how to use the AllignToVector method, the only thing happens is that the camera is not pointing at the entitys position.
How can i fix this ?