2021-04-25 10:03:06 +02:00
|
|
|
local vector_new = vector.new
|
2021-04-25 07:45:35 +02:00
|
|
|
|
2021-04-25 10:03:06 +02:00
|
|
|
mobs.do_head_logic = function(self,dtime)
|
2021-04-25 07:45:35 +02:00
|
|
|
|
2021-04-25 10:03:06 +02:00
|
|
|
--local yaw = self.object:get_yaw()
|
2021-04-25 07:45:35 +02:00
|
|
|
|
2021-04-25 10:03:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
--local bone_pos = vector_new(0,5,0)
|
|
|
|
|
|
|
|
--print(yaw)
|
|
|
|
|
|
|
|
--local _, bone_rot = self.object:get_bone_position("head")
|
|
|
|
|
|
|
|
--bone_rot.x = bone_rot.x + (dtime * 10)
|
|
|
|
--bone_rot.z = bone_rot.z + (dtime * 10)
|
|
|
|
|
|
|
|
--self.object:set_bone_position("head", bone_pos, bone_rot)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--set_bone_position([bone, position, rotation])
|
2021-04-25 07:45:35 +02:00
|
|
|
end
|