My bad, it was some programming behaviour i found comparing two models moving at same time one with PhysicsSetPosition, another with SetPosition.
The right script don't have to call GetPosition inside PhysicsLoop , because you need a constant absolute position throught time when moving, and force the object position with PhysicsSetPosition.
The good script :
Script.speedX = 0.5
function Script:Start()
self.entity:SetGravityMode(false)
self.pos = self.entity:GetPosition(true)
end
function Script:UpdatePhysics()
local window = Window:GetCurrent()
local xposition = 0
if window:KeyDown(Key.Q) then xposition =1 end
if window:KeyDown(Key.D) then xposition = -1 end
self.pos.x= self.pos.x + (xposition * self.speedX * Time:GetSpeed())
self.entity:PhysicsSetPosition(self.pos.x,self.pos.y, self.pos.z ,0.5)
end
ok, i'll take it in account