Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won

  1. Does anyone have any clue why adding a string metadata to an event causes the scml file to fail to load? It tells me that the file can't be found when I use Spriter = LoadContent<Spriter>(scmlPath); (it just returns null and outputs something about not finding the file in the console) I can add metadata to bones fine, but for some reason it refuses to load if there is a metadata variable attached to an event.
  2. In case anyone runs into this in the future, ultimately the issue boiled down to the pre-cached interpolated frames, and disabling pre-cacheing stopped the problem.
  3. Ran into another issue, curious if anyone has any tips. I was having trouble syncing up a walk cycle with the creatures movement because I was getting an odd inconsistent jitter. After investigating the issue, it seems that every time a bone hits a keyframe, it freezes for a frame. Is this intended, or is there some kind of workaround? It isn't noticeable normally, but it is noticeable in situations where you're trying to seamlessly sync movement to an animation.
  4. Does this implementation support "transitioning" from the current state of an animation to the starting state of the same animation? I have an attack animation, and I want to "transition" from the ending state of the animation to the beginning state of the next animation, but it seems to bug out. If I replace the Transition calls with Play it works, but of course without the transition.
  5. Hey folks, I'm running into a bit of an issue with generating spritesheets for my project using the SpriterDotNet api. Once we have an entity all rigged up and animated, if I go to "file > Generate Spritesheets for Project Images" it saves all of the compiled files with the same name and different extensions. For example, if I use the scml option and "character" as the base filename I'll get "character.scml", "character.json" and "character.png". The problem is that MonoGame's content builder doesn't seem to like it when I give it multiple files with the same name and different extensions. The content builder errors out saying it can't find some of the files. If I manually change the names of the json file and image to atlas.json and image.png, then manually edit the scml file and the json file with the changed names it loads just fine. Is there some way to tell Spriter to output the files with different names so I don't have to go manually edit the files every time I want to compile a spritesheet?
  6. I pretty much solved my own problem, but in case other folks want to go down this path in the future: From what I gather, the animator.FrameData.SpriteData contains objects that represent the information about the way a sprite needs to be positioned and drawn. It doesn't seem to contain a reference to the name of the bone that it is attached to by default. I edited the SpriterDotNet API to add a string variable named BoneName to the SpriterObject class in the SpriterModel.cs file, and then added "info.BoneName = timeline.Name;" to the top of the AddSpatialData method in the FrameDataCalculator class. This allows me to retrieve the BoneName from a SpriterObject.
  7. Heya folks, I have a question about how best to approach something. I set up per pixel collision detection by looping through the sprite data for the current frame (animator.FrameData.SpriteData), converting the in-game collision test position to a texture coordinate and then checking for the opacity of the pixel at that location on the texture, but I'm having trouble figuring out which bone corresponds to the sprite that was collided with. My intention is to set it up so that certain bones take more damage when hit. So far the best idea I've come up with is to set up both per pixel collision detection to accurately detect that a collision occurred, as well as a bounding box for specific collision zones to determine where the hit occurred, but that seems messier than would be ideal and wouldn't let me mark certain bones to be ignored by the per pixel collision detection. Is there a better way to approach what I'm trying to do here? Is there a way to loop through the bones currently being drawn rather than the sprites that would let me determine which bone has the sprite attached that is receiving a collision?
  • Create New...