mirror of
https://github.com/tacigar/maidroid.git
synced 2025-01-24 22:50:19 +01:00
Fix egg writer
This commit is contained in:
parent
e80ef175b1
commit
a5d83f0aa7
@ -224,18 +224,18 @@ do -- register a definition of an egg entity
|
|||||||
local length = 0.15
|
local length = 0.15
|
||||||
local new_position = vector.add(self.center_position, {
|
local new_position = vector.add(self.center_position, {
|
||||||
x = length * math.cos(self.angle * math.pi / 180.0),
|
x = length * math.cos(self.angle * math.pi / 180.0),
|
||||||
y = math.sin(self.angle * math.pi / 180.0) * 0.035,
|
y = math.sin(self.angle * math.pi / 180.0) * 0.025,
|
||||||
z = length * math.sin(self.angle * math.pi / 180.0),
|
z = length * math.sin(self.angle * math.pi / 180.0),
|
||||||
})
|
})
|
||||||
self.object:setpos(new_position)
|
self.object:setpos(new_position)
|
||||||
else
|
else
|
||||||
self.object:setpos(
|
local cur_position = self.object:getpos()
|
||||||
vector.add(self.center_position, {
|
local new_position = {
|
||||||
x = 0,
|
x = cur_position.x,
|
||||||
y = math.sin(self.angle * math.pi / 180.0) * 0.035,
|
y = self.center_position.y + math.sin(self.angle * math.pi / 180.0) * 0.025,
|
||||||
z = 0
|
z = cur_position.z,
|
||||||
})
|
}
|
||||||
)
|
self.object:setpos(new_position)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user