Forum rules - please read before posting.

Animation Problems

edited January 2018 in Technical Q&A
Hi

Recently started using Adventure Creator to make my very first (adventure) game. I'm in the process of following the tutorial. I'm having problems and confusion with animation though. I've tried following the written guide, adding an animation I made in After Effects - both as a GIF and as PNG - and I've added an idle sprite I made in Illustrator, but I can't for the life of me get it made into an animation that works in AC, whether in Animation or Animator. I'm so confused as to what I'm doing wrong and why. The sprite I have is a PNG.

Help would be much appreciated. Thanks.

Comments

  • Welcome to the community, @DustyShinigami.

    AC leverages Unity's own animation systems, rather than doing anything particularly unique or special - if you're unfamiliar with how Unity's animation system works, I do recommend going through Unity's documentation on it first.  Incorporating animation into AC adds another layer of complexity, so it's important to understand the way animation works before tying it into your character.

    We'll need some more details in order to help specifically - right now, it's not clear if the problem lies with the creation of the animation itself, or with getting it to play in AC.  If you could elaborate, and provide any relevant screenshots that show your setup and what you've got so far, then we can look to give you some specific advice.

    Presumably, your character is set up to use the "Sprites Unity" animation engine - is that correct?  Besides the video tutorials and Manual, a text-based tutorial for setting up 2D characters can be found here.
  • Hi.

    Yeah, the text-based tutorial was what I was following yesterday and yes, I'm using Sprites Unity. I tried creating a new character via the Create New Character Wizard, dragging and dropping my sprite into the field. So far I only have an idle sprite, but I read that even these need to have their own animation. I tried dragging and dropping it into the Animation and Animator windows, but I get a 'no' sign appear every time. Even with my 'dummy' animation I have that has multiple frames after turning it into a PNG in After Effects.

    I have noticed that when I select my sprite it comes up with a warning in Inspector that says 'Only textures with width/height being multiple of 4 can be compressed to DXT5 format'. Could this be responsible?
  • edited January 2018
    What do you mean by the 'no' sign?  Where does that appear?  Sprites can't be dropped into the Animator window, and yes - even single-frame idle states require their own animation.

    When working with "multiple frame" sprites, be sure to work with the individual sprites themselves (which can be found by expanding the original image file in the Hierarchy), and not the image file itself.

    I have noticed that when I select my sprite it comes up with a warning
    in Inspector that says 'Only textures with width/height being multiple
    of 4 can be compressed to DXT5 format'. Could this be responsible?

    No, that's just about texture compression which aids performance / file sizes.

    Are you dropping sprites into the Animation window?  Try instead keeping your Animator (with controller assigned) selected, then create a new Animation clip in the Animation window.  Then, with the Record button enabled, drop the sprite not into the Animation window, but into the "Sprite" field of your character's Sprite Renderer component.

    Again, please show images if you'd like more specific help - but it sounds like this is more to do with the actual creation of Unity animations, rather than having them play within AC. 
  • After some faffing, I worked out the process. :)

    By the 'no' sign I mean that there's a circle with a line through it whenever I try to drop a PNG file into the Animation window. I thought you could just drop them straight in, but like you say - you have to click on 'Create' first, name the animation, and THEN drop the image into it.
  • edited February 2018
    I'm making a horse racing game and any tips for solving this problem are really necessary. Do you have some?
  • @wandakelly: So far as I could tell, this was an issue to do with Unity's animation workflow, rather than anything specific to AC.  You may be able to get the advice you need from the Unity forums and/or Unity tutorials.  Otherwise, you'll have to give some fuller details on the exact problem you're having.
  • edited February 2018
    It's kinda relevant to the topic, so I didn't see the point in starting a new thread. I've noticed on a few occasions, even after following the video tutorial, that when I go to test the game out, the sprite zooms all around the scene. It either moves around too quickly, goes really slow or disappears from the scene entirely. Why is this? I set the navigation mesh so it doesn't overlap the edges of the scene.
    Also, I've set the player's starting position the same as in the tutorial (far left), but when I run the demo the player is positioned below the tree.
  • You'll need to post some images of the player root and sprite child Inspectors for me to be sure, but it may be that your sprite child is not located at the centre of the root object.

    Make sure that the Transform of your sprite child has a local position of 0,0,0.

    If it does, try dropping the provided 2D Demo player, /AdventureCreator/2D Demo/Resources/Brain2D, into the scene to see if he has the same behaviour.
  • Creating a Default SortingMap later into the tutorial seemed to fix it.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.