local LD = require("design.LevelDesignLibrary")
local targetObject, currentFrameAngVel, angularVelocity, lastFrameAngVel
function OnScriptLoaded(level, obj)
  targetObject = GameObjects.collapsingBridge00_P.Child
  lastFrameAngVel = engine.Vector.New(0, 0, 0)
  currentFrameAngVel = lastFrameAngVel
  game.SubObject.Sleep(obj)
  game.SubObject.SetForgetOnCheckpoint(obj)
end
function GetBridgeSpindleRotationalVelocity()
  currentFrameAngVel = targetObject:GetWorldJointUp(targetObject:GetJointIndex("JOLog1"))
  angularVelocity = (lastFrameAngVel - currentFrameAngVel):Length() * 1000
  lastFrameAngVel = currentFrameAngVel
  return angularVelocity
end
