I rotated an entity (ground) with
function Script:UpdateWorld()
if App.window:KeyDown(Key.L) then
rotationNow = self.entity:GetRotation()
self.entity:SetRotation(rotationNow.x,rotationNow.y,rotationNow.z-1)
System:Print("X: " ..rotationNow.x .. " Y: " ..rotationNow.y .. " Z: " ..rotationNow.z)
end
if App.window:KeyDown(Key.J) then
rotationNow = self.entity:GetRotation()
self.entity:SetRotation(rotationNow.x,rotationNow.y,rotationNow.z+1)
System:Print("X: " ..rotationNow.x .. " Y: " ..rotationNow.y .. " Z: " ..rotationNow.z)
end
if App.window:KeyDown(Key.K) then
rotationNow = self.entity:GetRotation()
self.entity:SetRotation(rotationNow.x-1,rotationNow.y,rotationNow.z)
System:Print("X: " ..rotationNow.x .. " Y: " ..rotationNow.y .. " Z: " ..rotationNow.z)
end
if App.window:KeyDown(Key.I) then
rotationNow = self.entity:GetRotation()
self.entity:SetRotation(rotationNow.x+1,rotationNow.y,rotationNow.z)
System:Print("X: " ..rotationNow.x .. " Y: " ..rotationNow.y .. " Z: " ..rotationNow.z)
end
end
before rotation
https://www.dropbox.com/s/wobccysass1cxtc/Screenshot%202014-01-18%2000.37.51.png
after rotation
https://www.dropbox.com/s/t7p73t5x9tm969f/Screenshot%202014-01-18%2000.38.19.png
when I have probs (like the sphere) on the ground they ignore the rotation and stay in the air until I touch them (with FPSplayer)
I think I need some kind of UpdateShape() or UpdatePhysics()
someone could tell me the right command that my props act like they should ?