Thank you so much.. this was very helpfull for me
Script.camera = "" --entity "Camera"
function Script:UpdateWorld()
local window = Window:GetCurrent()
if window:KeyDown(Key.W) then self.entity:AddForce(0,0,10,true) end
if window:KeyDown(Key.S) then self.entity:AddForce(0,0,-10,true) end
if window:KeyDown(Key.A) then self.entity:AddForce(-10,0,0,true) end
if window:KeyDown(Key.D) then self.entity:AddForce(10,0,0,true) end
if window:KeyHit(Key.Space) then self.entity:AddForce(0,500,0,true) end
self.camera:SetPosition(self.entity:GetPosition(true) + Vec3(0,2,-4))
end
ok thats cool but he jump in the air too
gives something like
if self.entity collision(world) then jump=true :end
if window:KeyHit(Key.Space) and jump=true then self.entity:AddForce(0,500,0,true) end
thanks