Advertisement
Guest User

4d2s

a guest
Jan 2nd, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. if(isnew)
  2.     {
  3.                
  4.         // make the skeleton
  5.         self.skeletonobject = skel_create(self.modelindex);
  6.        
  7.         PrintAnimInfo(self);
  8.         PrintSkelInfo(self);
  9.                
  10.         self.predraw = PlayerPredraw;
  11.            
  12.     }
  13.    
  14.     if(global_float > 360)
  15.         global_float = 0;
  16.     else
  17.         global_float+= 1;
  18.        
  19.     vector a_vec;
  20.     a_vec_y = global_float;
  21.    
  22.    
  23.          
  24.     // change the bones orientation
  25.     skel_set_bone_world (self, skel_find_bone (self.skeletonobject, "Head"), a_vec, '1 1 1');
  26.    
  27.     int print_info_every_frame = 0;
  28.     // diagnostics
  29.     if(print_info_every_frame)
  30.     {
  31.         vector current_head_position = skel_get_bonerel(self.skeletonobject, 24);
  32.  
  33.  
  34.         print("Heads position is ", vtos(current_head_position), " (", ftos(global_float), ")\n");
  35.  
  36. // just prints (excerpt):
  37. Heads position is '0.000000 0.000000 0.000000' (309)
  38. Heads position is '0.000000 0.000000 0.000000' (310)
  39. Heads position is '0.000000 0.000000 0.000000' (311)
  40. Heads position is '0.000000 0.000000 0.000000' (312)
  41. Heads position is '0.000000 0.000000 0.000000' (313)
  42. Heads position is '0.000000 0.000000 0.000000' (314)
  43. Heads position is '0.000000 0.000000 0.000000' (315)
  44. Heads position is '0.000000 0.000000 0.000000' (316)
  45. Heads position is '0.000000 0.000000 0.000000' (317)
  46.  
  47.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement