Jump to content

Noxalus

Members
  • Content Count

    13
  • Joined

  • Last visited

About Noxalus

  • Rank
    Member

Recent Profile Visitors

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

  1. Thank you for your answer @loodakrawa! I was expecting to be able to do what is shown in the video, but didn't find anything about that in the documentation. Unfortunately, even if it's cool, it doesn't match my needs because the animation of the sub-entity is stuck to the timeline of the main entity, so they are not independent like I would like them to be. Another use case example is a "blink eyes" animation, I asked the question many months ago. You might want to have a "blink eyes" animation on an animated character that doesn't depend on every animation timelines, it's the same problem here. What I have done to achieve this is that I created a class SpriterSubstituteEntity that take a reference Animator, the filename to replace (it would be better to be the name in the Spriter hierarchy, but I didn't be able to find how to retrieve this info), and an another Animator to use as replacement. This class will synchronize (transform + color) the Animator used as substitute with the sprite part filename found in the reference Animator: new SpriterSubstituteEntity("play-button.png", Animators["MainMenu"], Animators["PlayButton"]); I also create a child class from MonoGameAnimator to be able to hide the idle "play-button" from the main menu animation. For now, it works like a charm
  2. Hello everyone! I'm currently trying to replace a sprite part of an entity by another entity, but I don't really know how to do it properly. I made a main menu screen into Spriter to easily place and animate every element. It works great, except I would like to animate each element independently. Let's take the example of the play button. I would like to give it a pulse animation, so I created a new entity "PlayButton" with a single "Pulse" animation next to my "MainMenu" entity with its "Idle" animation where I placed all elements. When I load the Spriter file in my game, I will display the "Idle" animation of the "MainMenu", but I would like to replace the idle play button by the "PlayButton" entity. For now, I add my 2 entities in my scene, and set the "PlayButton" entity position according to the position of the play button in the "MainMenu" entity. The problem is the idle play button is still visible. I already tried to hide it (alpha to 0, remove it from the Spriter collection, etc...), but it didn't work like I expected. In addition, I would like that the "PlayButton" entity follows the same behaviour than the play button from the "MainMenu" entity. If I decide to create an animation in the "MainMenu" entity that moves the play button out of the screen, I would like to combine this translation with the animation of the "PlayButton" entity. Is someone already did this? Do you know how I'm supposed to do that properly? Thanks in advance for your help
  3. Hello frayt! I'm here to ask the exact same question, I would like to increase the size of each part of my sprite, but I don't want to rework all my already done animations :/ Any idea to do what we want?
  4. Thank you for your answer @Mike at BrashMonkey. This is what I thought at first, but to have a smooth animation, I need to have a lot of images, and it's not easily manageable. However, this problem should be handled by the engine used to display the sprite, but it will be great to have an option in Spriter to say that we want to repeat the texture on scaling instead of stretching it out. Is there a way to notify an engine of something like that with the current tool of Spriter?
  5. Hello everyone I have a sprite of a candy cane, like this one: And I would like to add it a stretch out animation of its bottom part without distort the image itself. As the bottom part pattern is simple (red and white alternance), I would like to replicate it instead. Do you know the best way to do that?
  6. Thank you for your answer, as you said, it seems to be a better idea to use a place-holder image instead of an action point.
  7. Thank you for your answer, here is a simple example: The test.png's origin is at the top center (x = 0.5, y = 0), if the box_000's origin is not at the same position, it won't work as expected. When I change the origin of the box moving the circle at the top left corner, it's better, but I can't move it precisely, so when the scale is too large, it won't work neither.
  8. Hello everyone I would like to use box to handle collision with some parts of my sprite. I lost a couple of hours trying to link a box to a sprite part using a bone because I didn't find how to place the box origin with precision (like when we do it for a sprite part for example). If the sprite part and the box don't have the same origin, it won't work at all when I want to rotate or scale the sprite. Do you know if it's possible to do that? Do you know an easier way to link a box to sprite part?
  9. Hello everyone I'm currently using action point to locate a circle collision box center position, and I was planning to use the scale property of this action point to update its radius according to my sprite animation. Unfortunatly, the scale property changes doesn't seems to be saved. Is there a reason for that? Someone already did encounter this problem before?
  10. Thanks a lot for your answer loodkrawa, that was really helpful for me! I take this opportunity to ask a new one. I'm new in the animation world, and it's the first time that I try to animate something, so I'm sorry if my question is kind of dumb, but I need to know. The character that I want to animate is a bell. In one of its animation, I would like that the clapper goes down until it hits the bottom of the screen: Then, I would like to play another animation, keeping the position of the clapper where it was in the previous animation (so it depends on the distance of the bottom of the screen): In this new animation, I would like that each time the clapper hits a wall, it goes to the inverse direction, like if there was physics. Is this possible to do that? If yes, what is the best way to do it? Thanks you so much for your help!
  11. Hello I'm using this spriter plugin with Monogame and I can say that it works pretty good for me! I have a little question and I don't know where to ask it so I'm sorry if it's not the good place: is there an easy way to get the world position of a pixel of an animation? What I would like to do is to attach a circle collision box that follows the animation of the entity. Currently the entity that owns the Spriter animator has a getter for position, rotation and scale that looks like that: class MyEntity : Entity { public virtual Vector2 Position() { var currentPosition = CurrentAnimator.Position; var spriteData = CurrentAnimator.FrameData.SpriteData[0]; var spriteDataPosition = new Vector2(spriteData.X, -spriteData.Y); return currentPosition + spriteDataPosition; } public virtual float Rotation() { var spriteData = CurrentAnimator.FrameData.SpriteData[0]; return MathHelper.ToRadians(-spriteData.Angle); } public virtual Vector2 Scale() { var spriteData = CurrentAnimator.FrameData.SpriteData[0]; return new Vector2(spriteData.ScaleX, spriteData.ScaleY); } } And my collision circle class looks like that: class CollisionCircle { private Matrix GetMatrix() { var scale = Entity.Scale(); var rotation = Entity.Rotation(); var position = Entity.Position(); return Matrix.CreateScale(Math.Abs(scale.X), Math.Abs(scale.Y), 1.0f) * Matrix.CreateRotationZ(rotation) * Matrix.CreateTranslation(position.X, position.Y, 0.0f); } public Vector2 GetCenter() { var entityTransformMatrix = GetMatrix(); var localCenter = _relativePosition; var vertexPosition = new Vector3(localCenter.X, localCenter.Y, 0f); var transformedVertexPosition = Vector3.Transform(vertexPosition, entityTransformMatrix); var worldCenter = new Vector2(transformedVertexPosition.X, transformedVertexPosition.Y); return worldCenter; } } It works as expected, the collision circle follows the animation. But if I update the rotation or the scale of the `CurrentAnimator`, it's not taken into account by the collision circle. I thought that I needed to update the Position() method to transform the `CurrentAnimator.Position` according to the `CurrentAnimator.Rotation`, but it doesn't seem to work :'( Is there a way to obtain the position that I try to compute using this library directly? Thanks a lot in advance for your answer
  12. Thanks a lot for your answer @loodakrawa, now I know it's possible, I will start testing
  13. Hello everyone! I'm a real beginner with Spriter (and with animation in general), I discovered it some days ago, but I would like to use it for a MonoGame project on Android and I have some newbie question. - Is it possible with Spriter to combine multiple animations? Let's say that we have a character with a "walk" animation and an "eyes blink" animation, is it possible to play both simultaneously? As a matter of fact, I would like to play the "eyes blink" animation independently, no matter what is the animation that is currently playing. - Is it possible to get the world position of a part of an animation? Let's say that we have a character waving arms, is it possible to get the position of the end of the left arm for example? - Is it possible to attach bouding boxes to every parts of the sprite so that the transformations (translation, rotation and scale) applied to the sprite are also applied to the bounding boxes? I'm sorry if the questions are really dumb, but I need to know if these 3 points can be achieved with Spriter and the MonoGame extension. Thanks in advance
×
×
  • Create New...