A:
add_hook("enter_freeze","disableGhost",function() set_ghost(0) end)
C: The distance from Tori's head to Uke's Joints. Returns an array.
function getDistance()
distance={}
hPos = get_body_info(0,0).pos
for j=0, 19 do
jPos = get_joint_pos2(1, j)
distance[j] = math.sqrt(math.pow(hPos.x-jPos.x,2)+math.pow(hPos.y-jPos.y,2)+math.pow(hPos.z-jPos.z,2))
end
return distance
end
As far as I know it's impossible to get the exact momentum. You could try to get the acceleration with a = 2s/t² for very short t. You have to figure out the mass somehow else.
e: My bad, momentum is m*v, not m*a. For v use get_body_linear_vel() and get_body_angular_vel(). Still the Problem with the mass.
Last edited by psycore; May 27, 2011 at 09:26 PM.