Better textures for turtle, and fix rotation
This commit is contained in:
parent
7aef9df55d
commit
d1d8f50375
@ -1,5 +1,6 @@
|
|||||||
License of textures and models
|
License of textures and models
|
||||||
Textures and nodebox of screen are by kaeza, modified by Nore, under the WTFPL license
|
Textures and nodebox of screen are by kaeza, modified by Nore, under the WTFPL license
|
||||||
|
Texture and model of turtle by kilbith, modified by Nore, under the CC0 license
|
||||||
All other textures are by kaeza, licensed under the CC-BY-SA license
|
All other textures are by kaeza, licensed under the CC-BY-SA license
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
34
models/turtle.obj
Normal file
34
models/turtle.obj
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Blender v2.69 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib turtle.mtl
|
||||||
|
o Cube
|
||||||
|
v 0.400000 -0.400000 -0.400000
|
||||||
|
v 0.400000 -0.400000 0.400000
|
||||||
|
v -0.400000 -0.400000 0.400000
|
||||||
|
v -0.400000 -0.400000 -0.400000
|
||||||
|
v 0.400000 0.400000 -0.400000
|
||||||
|
v 0.400000 0.400000 0.400000
|
||||||
|
v -0.400000 0.400000 0.400000
|
||||||
|
v -0.400000 0.400000 -0.400000
|
||||||
|
vt 0.499999 0.500000
|
||||||
|
vt 0.499999 0.749956
|
||||||
|
vt 0.250043 0.749957
|
||||||
|
vt 0.250042 0.500001
|
||||||
|
vt 0.499998 0.250043
|
||||||
|
vt 0.250041 0.250044
|
||||||
|
vt 0.250040 0.000088
|
||||||
|
vt 0.499996 0.000087
|
||||||
|
vt 0.749956 0.749956
|
||||||
|
vt 0.749956 0.999913
|
||||||
|
vt 0.500000 0.999913
|
||||||
|
vt 0.250043 0.999913
|
||||||
|
vt 0.000087 0.999913
|
||||||
|
vt 0.000087 0.749957
|
||||||
|
usemtl Material
|
||||||
|
s off
|
||||||
|
f 1/1 2/2 3/3 4/4
|
||||||
|
f 5/5 8/6 7/7 6/8
|
||||||
|
f 1/9 5/10 6/11 2/2
|
||||||
|
f 2/2 6/11 7/12 3/3
|
||||||
|
f 3/3 7/12 8/13 4/14
|
||||||
|
f 5/5 1/1 4/4 8/6
|
12
t2.lua
12
t2.lua
@ -188,16 +188,20 @@ local function done_move(pos, spos, npos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function done_rotation(yaw, nyaw, rotate_speed)
|
local function done_rotation(yaw, nyaw, rotate_speed)
|
||||||
return (nyaw - yaw + rotate_speed - math.pi / 2) % (2 * math.pi) < math.pi
|
return (((nyaw - yaw + rotate_speed) % (2 * math.pi)) - math.pi) * (((nyaw - yaw) % (2 * math.pi) - math.pi)) <= 0
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_entity("turtle:turtle", {
|
minetest.register_entity("turtle:turtle", {
|
||||||
physical = true,
|
physical = true,
|
||||||
collisionbox = {-0.4999, -0.4999, -0.4999, 0.4999, 0.4999, 0.4999}, -- Not 0.5 to avoid the turtle being stuck due to rounding errors
|
collisionbox = {-0.4999, -0.4999, -0.4999, 0.4999, 0.4999, 0.4999}, -- Not 0.5 to avoid the turtle being stuck due to rounding errors
|
||||||
collides_with_objects = false,
|
collides_with_objects = false,
|
||||||
visual = "wielditem", -- TODO: change that to a mesh, and add animations
|
--visual = "wielditem", -- TODO: change that to a mesh, and add animations
|
||||||
visual_size = {x = 2/3, y = 2/3},
|
--visual_size = {x = 2/3, y = 2/3},
|
||||||
textures = {"default:wood"},
|
--textures = {"default:wood"},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "turtle.obj",
|
||||||
|
textures = {"turtle.png"},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
on_activate = function(self, staticdata)
|
on_activate = function(self, staticdata)
|
||||||
local id = tonumber(staticdata)
|
local id = tonumber(staticdata)
|
||||||
if id ~= nil then
|
if id ~= nil then
|
||||||
|
BIN
textures/turtle.png
Normal file
BIN
textures/turtle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
x
Reference in New Issue
Block a user