Add support for pitch animation, although the mesh is not correct

master
PilzAdam 2012-12-13 20:46:05 +01:00
parent cb85d45a05
commit 6927ab4f88
1 changed files with 8 additions and 0 deletions

View File

@ -366,6 +366,14 @@ function cart:on_step(dtime)
self.object:setyaw(0)
end
if dir.y == -1 then
self.object:set_animation({x=1, y=1}, 1, 0)
elseif dir.y == 1 then
self.object:set_animation({x=2, y=2}, 1, 0)
else
self.object:set_animation({x=0, y=0}, 1, 0)
end
end
minetest.register_entity("carts:cart", cart)