Hi! When I used Entity:Move child entities of model wont work. 3D model is moving but Leadwerks stuff like pivots, cameras etc. won't move. I discovered it on that script:
Script.object = "" --entity "Starship"
Script.pivot = "" --entity "CameraPos"
Script.uppoint = "" --entity "FowardPivot"
Script.backpoint = "" --entity "BackPivot"
Script.camera = "" --entity "Camera"
function Script:Start()
end
function Script:UpdateWorld()
objectrot = Vec3()
if window:KeyDown(Key.W) then
self.object:Move(self.uppoint:GetPosition())
end
if window:KeyDown(Key.A) then
local oldrotation = Vec3()
local newrotation = Vec3()
oldrotation = self.object:GetRotation()
newrotation = oldrotation+Vec3(0,0,0.7)
self.object:SetRotation(newrotation)
objectrot = newrotation
end
if window:KeyDown(Key.D) then
local oldrotation = Vec3()
local newrotation = Vec3()
oldrotation = self.object:GetRotation()
newrotation = oldrotation+Vec3(0,0,-0.7)
self.object:SetRotation(newrotation)
objectrot = newrotation
end
end
The
Script.uppoint = "" --entity "FowardPivot"
is a child of
Script.object = "" --entity "Starship"
. When i try to move with "W" pivot should go with spaceship but it won't.