Jump to content

RastiLechner

Members
  • Posts

    2
  • Joined

  • Last visited

RastiLechner's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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
  2. i have created a ball in editor i gave him physics mass and sphere collision. in next ste i write for him script . but the script don't work. can somebody explain me whats the problem ? script: if KeyHit(Key.W) then Entity AddForce(0,0,100,true) attached file is screenshot thanks p.s. sorry for my english
×
×
  • Create New...