Why animation center option (point of origin) is deactivated for some animations?

  • #1, by LebosteinThursday, 23. April 2015, 10:35 10 years ago
    Why in some cases I can not declare the center of animation frames? The button is greyed out...

    Key Killer

    621 Posts


  • #2, by afrlmeThursday, 23. April 2015, 12:04 10 years ago
    Which animations? Are you talking about animations associated with objects? Only animations such as cursors & characters allow you to define the animation center.

    In the next public build, there is a new feature which allows you to declare an x/y offset to each individual frame, which can be used to correct any mis-aligned animation frames.

    Imperator

    7285 Posts

  • #3, by LebosteinSaturday, 26. September 2015, 22:39 9 years ago
    For example the animations of object images. No way to set the center of the animation.

    I don't understand, why I can not set the relative animation center of a non character animation... It is very helpful in some cases to define a point of origin outside the left upper corner - if you handle with frames that have different sizes for example, or for generating snoop animations, or if you rotate or move an object around a center point during some frames. Inside the Visionaire structure a character animation and an object animation are the same objects! Why in one case it is allowed to set the point of origin ("zero point") an in the other case it is not allowed?

    Key Killer

    621 Posts

  • #4, by afrlmeSunday, 27. September 2015, 00:47 9 years ago
    I'm not sure. In regards to frames of different sizes though, there is an option inside of the options tab of the animation toolbar. Something about animations moving vertically or something. I believe that is for keeping the animation centered or something - it says what it does in the wiki, as far as I recall.

    Typically sprites are all positioned by the top left most pixel. Characters are special cases because we have to determine their feet position (most often than not) which is used to declare their position on the screen & to prevent them from walking too far outside of the way borders.

    You could use Lua script to easily position an animation based on the center of the sprite. You would return the animation current position + half the width of the animation to get X & + half the height of the animation to get Y. I'm not sure about returning the sprite of an animation though. It might be a bit taxing on the engine to return the center position of each frame sprite, so it might have to be done manually if you know the width of the animation in general.

    Imperator

    7285 Posts