--Rotate
local otherRot = self.otherEntity:GetRotation(true)
local camRot = self.camera:GetRotation(true)
if(otherRot ~= camRot) then
self.otherEntity:AlignToVector(90, camRot.y, 0, 1)
end
I want to rotate an entity to match the camera's rotation on the y axis.
However, when I use this exact script, it just sets a random rotation when I look more or less than 0 degrees on the y axis.
How can it be fixed ? The Api reference to this has a broken script, it looks like this, btw : light->SetRotation(35,35,0);<br /> <br /> //Create a model<br />