Better controls

master
Zeg9 2012-12-15 14:12:08 +01:00
commit 445deb8469
2 changed files with 6 additions and 4 deletions

4
README.md Normal file
View File

@ -0,0 +1,4 @@
minetest-ufos
=============
UFOs mod for minetest

View File

@ -42,10 +42,8 @@ function ufo:on_step (dtime)
local vel = self.object:getvelocity()
local acc = self.object:getacceleration()
if ctrl.up then
vel.x = math.cos(self.object:getyaw()+math.pi/2)*UFO_SPEED
vel.z = math.sin(self.object:getyaw()+math.pi/2)*UFO_SPEED
acc.x = vel.x*.25
acc.z = vel.z*.25
acc.x = math.cos(self.object:getyaw()+math.pi/2)*UFO_SPEED
acc.z = math.sin(self.object:getyaw()+math.pi/2)*UFO_SPEED
else
acc.x = -vel.x/5
acc.z = -vel.z/5