function draw3dfunc()
x, y, z = get_joint_pos(0, 0)
set_color(0,0,0,1)
draw_sphere(x,y,z,0.12)
end
add_hook("draw3d","drawsphere",draw3dfunc)
function jointinfo()
state = get_joint_info(0,0).state
if state == 4 then
echo("Neck is relaxed")
else
echo("Neck isn't relaxed")
end
end
add_hook("enter_frame","jointstate",jointinfo)
function draw3dfunc()
x, y, z = get_joint_pos(0, 0)
set_color(0,0,0,1)
draw_sphere(x,y,z,0.12)
end
add_hook("draw3d","drawsphere",draw3dfunc)
function jointinfo()
state = get_joint_info(0,0).state
if state == 4 then
echo("^32Neck is relaxed")
elseif state == 3 then
echo("^04Neck is holded")
elseif state == 2 then
echo("^13Neck is contracting")
elseif state == 1 then
echo("^02Neck is extending")
end
end
add_hook("enter_freeze","jointstate",jointinfo)
+Rep