Jump to content

clym

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. OOooh I got it thank you!! So the reason I was messing up was on the example I gave, the angle was set to 43....once I set it to 0 degrees the X&Y were correct!! Then I apply the rotation based on the parent X+Y & parent Angle vs what I was doing which was trying to find the X+Y using the parent end point haha. Thank you for your patience!! Cheers @lucid
  2. Hmm so in the example given, you're saying bone_001's X&Y position will be that of the parent? At frame 1 the parent bone (bone_000) x&y = 0, so bone_001's x&y is therefore 0? I'm not quite sure I follow how that would work? Is there somewhere that has .scon reference so I know what each part is referring to? Cheers
  3. I've attached an image to show that I'm trying to get the "???" x + y value. Yeah I used the length (or width) of the root bone found in "obj_info" as "w:149" line 110 in the attached file - and the angle to find the x+y end position using basic trigonometry. The end x&y position of the root bone comes out correct (tested in the editor by creating a new bone with no parent). The xScale and yScale are default 1, for all the bones so I don't think that even showed up in the .scon file. I'll attach that file ... Even If I did apply that I'm not sure how that would change? for example 371*1 = still 371. Cheers, boneTest4.scon
  4. Yes relative to the x&y of the end of the root bone? Is the root bone x+y absolute? If so... If i take the x of the end root bone and + the "relative" value to that...it comes to 371 in the example I gave. Vs it actually needs to be x:190 not 371! Any ideas how to convert that relative number to an absolute one? cheers
  5. Hi @lucid many thanks for your speedy reply! That's also what I thought originally although the numbers aren't coming out the same...maybe i'm doing something wrong. Let me give an example of just 2 bones: bone1 (root): X: 0, Y: 0, angle: 43.688, width: 149.44399. Using Cos and Sin method, the X+Y of the end is about: X: 108, Y: 103 (Math.cos(angle*(Math.PI/180))*width and Math.sin(angle*(Math.PI/180))*width) - which when I check in editor by manually placing a bone at those coordinates it seems correct. (Although Y is actually negative -103 vs 103 but that's fine). bone2 (parented to root): (in editor): X:190.322, Y: -182.258. (in .scon): X: 263.515, Y: 0.33074. Now even if we took just the Y value of bone 2: 103 + 0.33074 does not equal -182.258 or 182.258. Even if I do: 103 - 0.33074 it still remains no where near that -182 mark! If I go for the X: 108 + 263 = 371 or 108 - 263 = -155 or 263 - 108 = 155. So as you can see no matter what I try it still is no where near the editor values of X:190. I've attached some pics hopefully that all makes some sense! Any light shed would be amazing! Thanks Clym
  6. Hi there, I'm currently trying to work with the .scon (json) file type that Spriter exports and I'm slightly confused by some of it's translation... Q: (Using Spriter release 11) - For the root bone, the X & Y positions found in the timeline array are the same as in the editor. - However the child bones X&Y position in the .scon seem to be very different to the editor and I can't figure out if the position is relative to the end X&Y of the parent/root bone? Or something else. any info on that would be great! Let me know if you need an aditional info/pics I'm finding the bone info under: entity[0].animation[0].timeline[0].key[0].bone.angle Thanks, Clym
×
×
  • Create New...