Jump to content


  • Content Count

  • Joined

  • Last visited

About WormLice

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Not sure how, but the bug seems fixed now. If I encounter it again I'll let you know.
  2. Windows 7, 64 bits. Not sure if it matters but OpenGL is 4.5.
  3. I tried the GetFrameData method but it doesn't seen to be doing anything at all. I'm probably using it wrong, but I'm clueless what is wrong. Here's my current code: if (BodyAnimator.CurrentAnimation.Name.Equals("Attack.W0")) { Vector2 mousePosition = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y")); BodyAnimator.DataProvider.GetFrameData(BodyAnimator.Time, Time.deltaTime, 0.0f, BodyAnimator.CurrentAnimation).SpriteData[5].Angle = Mathf.Acos(mousePosition.x / mousePosition.magnitude); } SpriteData[5] is the number that my sprite is located when I'm running the program playing my target animation. The idea is setting the angle to the mouse position so the sprite always face the mouse.
  4. Just got that working . Cool! Btw, it would be nice for the user to be able to choose which sprites he wants collision on and the ones he don't. Awesome news . Didn't know it's possible to play multiple animations simultaneously already. How would I do so, even in higher levels? Awesome I'll try it out and let you know how it goes. I think I got it now. It's not really a bug. Since the animation doesn't get the progress reset the transition happens to the progress of the current animation, making the animation seem to play faster. Keep up the awesome work .
  5. I'm calling the Transtion method. What I meant is that after quickly switching through them the animation seems plays faster.
  6. Found a potential issue. The animations seem to not be starting from the beginning after switching to another animation while the current is playing and switching back to the last animation. EDIT: Setting Progress to 0.0f before staring a new Animation worked.
  7. Another pretty annoying bug I found is that Spriter Pro keeps crashing after closing the variables window after creating a variable.
  8. Thanks for the answer , Didn't know about this feature, sorry. Does that copy the Hierarchy too?
  9. Hi, Here are some ideas: - Duplicate an object with Ctrl+C & Ctrl+V - Copy current Hierarchy to all other frames
  10. I noticed a bug in the Hierarchy view. Sometimes an sprite disappear after you change it's parent. When you change the position/rotation/scale it appears again. Another bug, sometimes the width/height of the boxes added are negative in the scml file leading to unexpected behavior on some implementations of Spriter.
  11. A method that plays an animation and make sure the animation is finished playing N times before starting a new one (after calling Play/Transtion again). I wasn't very clear, sorry. I meant creating them based on the Sprite image width/height, as an option when importing the scml. That would save a lot of time creating boxes in Spriter. Adding some snippets to README.md would be a nice idea. It would be useful to change animations dynamically. An idea I had recently: - Ability to play different animations simultaneously (eg. arm.Play("A0"); body.Play("A1");)
  12. Here are some ideas (not only for colliders): - Animation Start event - Practical way to wait for animation to end before starting a new one - Automatic BoxCollider2D generation - Add some examples to the Github project for each fearture shown - Name the Sprites/Boxes to their name in Spriter (so you can use the Find method)
  13. http://brashmonkey.com/forum/index.php?/topic/4166-spriterdotnet-an-implementation-for-all-c-frameworks/&do=findComment&comment=14302 It does seem like a bug. The Box origin changes depending on the direction you set the width/height of the Box. It might be intentional too, it's hard to tell. The code that I sent you before should work in all the cases. In my opinion, "fixing" this method in the library would be a good idea, to support scml from versions that have the apparent bug. I don't think that this fix will break anything in the future. P.S: Is there a practical way of getting a collider by name? EDIT: When width/height is negative the Boxes seem to be a little offset. Not sure why that happens.
  14. It seems the negative width/height is intentional, not a bug. It's basically the direction the scaling goes. Here's what happens when I set all widths/heights to positive: It should be pretty easy to fix through. EDIT: Fixed. Changed the ApplyBoxTransform method at UnitySpriterAnimator.cs to: protected override void ApplyBoxTransform(SpriterObjectInfo objInfo, SpriterObject info) { GameObject child = childData.Boxes[boxIndex]; GameObject pivot = childData.BoxPivots[boxIndex]; child.SetActive(true); pivot.SetActive(true); float w = objInfo.Width / DefaultPPU; float h = objInfo.Height / DefaultPPU; BoxCollider2D collider = child.GetComponent<BoxCollider2D>(); collider.size = new Vector2(Mathf.Abs(w), Mathf.Abs(h)); child.name = objInfo.Name; float deltaX = (DefaultPivot - info.PivotX) * w * info.ScaleX; float deltaY = (DefaultPivot - info.PivotY) * h * info.ScaleY; pivot.transform.localEulerAngles = new Vector3(0, 0, info.Angle); pivot.transform.localPosition = new Vector3(info.X / DefaultPPU, info.Y / DefaultPPU, 0); child.transform.localPosition = new Vector3(deltaX, deltaY, child.transform.localPosition.z); child.transform.localScale = new Vector3(info.ScaleX * w >= 0.0f ? 1.0f : -1.0f, info.ScaleY * h >= 0.0f ? 1.0f : -1.0f, 1); ++boxIndex; }
  15. Hello, I bought Spriter Pro and created a Box to test the BoxCollider2D in Unity. However, after imported to Unity the BoxCollider2D generated seem always disabled due to a too small size (~0.00001). I guess this is intentional, to enable only BoxCollider2Ds that are being used in the current playing animation. But, even after switching the Animation to the one with the Box the BoxCollider2D size is still the same. Any help would be appreciated .
  • Create New...