人の体の部位の座標の取り方

Last-modified: 2015-05-03 (日) 21:28:07

■BONE_ID

   {
  1 Spine1
  2 Head
  3 R UpperArm
  4 L UpperArm
  5 R Hand
  6 L Hand
  7 R Thigh
  8 L Thigh
  9 R Foot
  10 L Foot
  11 L Calf
  12 R Calf
  13 R ForeArm
  14 L ForeArm
  15 Bip01 R Clavicle
  16 Bip01 L Clavicle
  17 Neck
  18 Jaw
   }

■プレイヤーのボーン6を中心とした座標の取得

  {$VERSION 3.1.0027}
  {$CLEO .cs}
  thread 'tbo'
  :BONETEST
  wait 0
  if
  056D: actor $PLAYER_ACTOR defined
  jf @BONETEST
  0AB1: call_scm_func @GET_BONE_OFFSET 5 actor $PLAYER_ACTOR bone 6 offset 2.0 0.0 0.0 store_to 0@ 1@ 2@
  04D5: create_corona_at 0@ 1@ 2@ radius 0.05 type 0 flare 0 RGB 255 255 255
  0AB1: call_scm_func @GET_BONE_OFFSET 5 actor $PLAYER_ACTOR bone 6 offset 80.0 0.0 0.0 store_to 0@ 1@ 2@
  04D5: create_corona_at 0@ 1@ 2@ radius 10.05 type 0 flare 0 RGB 255 255 255
  jump @BONETEST
  :GET_BONE_OFFSET
  0A96: 0@ = actor 0@ struct
  0085: 5@ = 0@ // (int)
  000A: 5@ += 0x18
  0A8D: 5@ = read_memory 5@ size 4 virtual_protect 0
  0AA7: call_function 0x734A40 num_params 1 pop 1 5@ 5@ // _clumpGetFirstSkinAtomicHAnimHierarchy
  0012: 1@ *= 0x4
  000A: 1@ += 0x488
  005A: 1@ += 0@ // (int)
  0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  000A: 1@ += 0x14
  0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  0A8D: 7@ = read_memory 0x7C51E0 size 4 virtual_protect 1
  ///////////////version_check///////////////
  00D6: if
  0039: 7@ == 0x0424548B
  then
      0AA7: call_function 0x7C51E0 num_params 2 pop 2 1@ 5@ 1@ // _RpHAnimIDGetIndex
      0AA7: call_function 0x7C5160 num_params 1 pop 1 5@ 5@ // _RpHAnimHierarchyGetMatrixArray
      0012: 1@ *= 0x40
      005A: 1@ += 5@ // (int)
  else
      0AA7: call_function 0x7C51A0 num_params 2 pop 2 1@ 5@ 1@ // _RpHAnimIDGetIndex
      0AA7: call_function 0x7C5120 num_params 1 pop 1 5@ 5@ // _RpHAnimHierarchyGetMatrixArray
      0012: 1@ *= 0x40
      005A: 1@ += 5@ // (int)
  end
  ///////////////version_check///////////////
  0A9F: 5@ = current_thread_pointer
  000A: 5@ += 0x44
  0AA5: call 0x54EEF0 num_params 4 pop 4 5@ 1@ 1 5@ // _transofrmPoints
  0AB2: ret 3 2@ 3@ 4@